diff --git a/.gitignore b/.gitignore index d6478c8..07d3d2a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ matplotex-*.tar /tmp/ /.github -/samples \ No newline at end of file +/samples +/add_line.sh diff --git a/README.md b/README.md index 8e2f884..18ae6ff 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ The package can be installed by adding **Matplotex** 0.2.0" } ] ``` diff --git a/lib/matplotex.ex b/lib/matplotex.ex index 824ab66..965cdce 100644 --- a/lib/matplotex.ex +++ b/lib/matplotex.ex @@ -1,7 +1,5 @@ defmodule Matplotex do @moduledoc """ - # Matplotex - A lightweight and efficient Elixir library designed for server-side SVG generation, ideal for data visualization in web applications. It integrates seamlessly with Phoenix LiveView and provides powerful tools for generating dynamic visualizations. ## Supported Graph Types diff --git a/lib/matplotex/blueprint.ex b/lib/matplotex/blueprint.ex index 4119194..09980ce 100644 --- a/lib/matplotex/blueprint.ex +++ b/lib/matplotex/blueprint.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Blueprint do +@moduledoc false @callback new(graph :: module(), params :: map()) :: any() @callback set_content(graphset :: any()) :: any() @callback add_elements(graphset :: any()) :: any() diff --git a/lib/matplotex/blueprint/chord.ex b/lib/matplotex/blueprint/chord.ex index 41940bd..f8327af 100644 --- a/lib/matplotex/blueprint/chord.ex +++ b/lib/matplotex/blueprint/chord.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Blueprint.Chord do +@moduledoc false @true_by_default false @false_by_default true defmacro chord(opts \\ []) do diff --git a/lib/matplotex/blueprint/frame.ex b/lib/matplotex/blueprint/frame.ex index 5b7e356..4e45f60 100644 --- a/lib/matplotex/blueprint/frame.ex +++ b/lib/matplotex/blueprint/frame.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Blueprint.Frame do +@moduledoc false alias Matplotex.Figure.Legend @default_margin 0.05 @show_by_default true diff --git a/lib/matplotex/element.ex b/lib/matplotex/element.ex index cdc4d83..ebcf5cf 100644 --- a/lib/matplotex/element.ex +++ b/lib/matplotex/element.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element do +@moduledoc false @callback assemble(element :: struct()) :: String.t() def assemble(%module{} = element), do: module.assemble(element) diff --git a/lib/matplotex/element/circle.ex b/lib/matplotex/element/circle.ex index 79601c7..b9376b5 100644 --- a/lib/matplotex/element/circle.ex +++ b/lib/matplotex/element/circle.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Circle do +@moduledoc false alias Matplotex.Element use Element diff --git a/lib/matplotex/element/label.ex b/lib/matplotex/element/label.ex index bc29554..0f664da 100644 --- a/lib/matplotex/element/label.ex +++ b/lib/matplotex/element/label.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Label do +@moduledoc false alias Matplotex.Element use Element @default_fill "black" diff --git a/lib/matplotex/element/legend.ex b/lib/matplotex/element/legend.ex index 340e44c..2124be8 100644 --- a/lib/matplotex/element/legend.ex +++ b/lib/matplotex/element/legend.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Legend do +@moduledoc false alias Matplotex.Element.Label alias Matplotex.Element diff --git a/lib/matplotex/element/line.ex b/lib/matplotex/element/line.ex index 4f6d914..fce6a6c 100644 --- a/lib/matplotex/element/line.ex +++ b/lib/matplotex/element/line.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Line do +@moduledoc false alias Matplotex.Element use Element diff --git a/lib/matplotex/element/polygon.ex b/lib/matplotex/element/polygon.ex index 2d81010..b7ca54e 100644 --- a/lib/matplotex/element/polygon.ex +++ b/lib/matplotex/element/polygon.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Polygon do +@moduledoc false alias Matplotex.Element use Element @default_fill "blue" diff --git a/lib/matplotex/element/rad_legend.ex b/lib/matplotex/element/rad_legend.ex index 7ff0294..5a36415 100644 --- a/lib/matplotex/element/rad_legend.ex +++ b/lib/matplotex/element/rad_legend.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.RadLegend do +@moduledoc false alias Matplotex.Element.Label alias Matplotex.Element alias Matplotex.Element.Rect diff --git a/lib/matplotex/element/rect.ex b/lib/matplotex/element/rect.ex index 71591c2..689ccc9 100644 --- a/lib/matplotex/element/rect.ex +++ b/lib/matplotex/element/rect.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Rect do +@moduledoc false alias Matplotex.Element @default_stroke_width 2 diff --git a/lib/matplotex/element/slice.ex b/lib/matplotex/element/slice.ex index 7c1a436..bee7dcd 100644 --- a/lib/matplotex/element/slice.ex +++ b/lib/matplotex/element/slice.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Slice do +@moduledoc false alias Matplotex.Element use Element diff --git a/lib/matplotex/element/spline.ex b/lib/matplotex/element/spline.ex index a3f60c6..630af28 100644 --- a/lib/matplotex/element/spline.ex +++ b/lib/matplotex/element/spline.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Spline do +@moduledoc false alias Matplotex.Element use Element @default_stroke_width 2 diff --git a/lib/matplotex/element/stencil.ex b/lib/matplotex/element/stencil.ex index 03c2590..0d69508 100644 --- a/lib/matplotex/element/stencil.ex +++ b/lib/matplotex/element/stencil.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Element.Stencil do +@moduledoc false def line(line) do ~s( 10 do factor = value |> :math.log10() |> floor() diff --git a/lib/matplotex/figure/radial.ex b/lib/matplotex/figure/radial.ex index 8fbc267..f8724c7 100644 --- a/lib/matplotex/figure/radial.ex +++ b/lib/matplotex/figure/radial.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Radial do +@moduledoc false alias Matplotex.Utils.Algebra @callback create(struct(), list(), keyword()) :: struct() diff --git a/lib/matplotex/figure/radial/accumulator.ex b/lib/matplotex/figure/radial/accumulator.ex index 963a978..a594973 100644 --- a/lib/matplotex/figure/radial/accumulator.ex +++ b/lib/matplotex/figure/radial/accumulator.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Radial.Accumulator do +@moduledoc false alias Matplotex.Figure.Radial.LegendAcc @start_angle :math.pi() / 2 diff --git a/lib/matplotex/figure/radial/dataset.ex b/lib/matplotex/figure/radial/dataset.ex index 84088fb..a0ebd43 100644 --- a/lib/matplotex/figure/radial/dataset.ex +++ b/lib/matplotex/figure/radial/dataset.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Radial.Dataset do +@moduledoc false defstruct sizes: [], labels: [], colors: [], diff --git a/lib/matplotex/figure/radial/legend_acc.ex b/lib/matplotex/figure/radial/legend_acc.ex index 86bc875..bce62eb 100644 --- a/lib/matplotex/figure/radial/legend_acc.ex +++ b/lib/matplotex/figure/radial/legend_acc.ex @@ -1,3 +1,4 @@ defmodule Matplotex.Figure.Radial.LegendAcc do +@moduledoc false defstruct [:x, :y, :uheight, :uwidth] end diff --git a/lib/matplotex/figure/radial/pie.ex b/lib/matplotex/figure/radial/pie.ex index a9d6769..60b36b1 100644 --- a/lib/matplotex/figure/radial/pie.ex +++ b/lib/matplotex/figure/radial/pie.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Radial.Pie do +@moduledoc false alias Matplotex.Figure.RcParams alias Matplotex.Utils.Algebra alias Matplotex.Figure.Areal.Region diff --git a/lib/matplotex/figure/rc_params.ex b/lib/matplotex/figure/rc_params.ex index 96ef24f..328e424 100644 --- a/lib/matplotex/figure/rc_params.ex +++ b/lib/matplotex/figure/rc_params.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.RcParams do +@moduledoc false alias Matplotex.Figure.Font @default_figsize {8, 6} @default_dpi 96 diff --git a/lib/matplotex/figure/sketch.ex b/lib/matplotex/figure/sketch.ex index 9f6d71b..87d2a8f 100644 --- a/lib/matplotex/figure/sketch.ex +++ b/lib/matplotex/figure/sketch.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Sketch do +@moduledoc false alias Matplotex.Figure @dpi 96 diff --git a/lib/matplotex/figure/text.ex b/lib/matplotex/figure/text.ex index 7b915a0..85eea7a 100644 --- a/lib/matplotex/figure/text.ex +++ b/lib/matplotex/figure/text.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.Text do +@moduledoc false alias Matplotex.Figure.Text alias Matplotex.Figure.Font diff --git a/lib/matplotex/figure/two_d.ex b/lib/matplotex/figure/two_d.ex index 6021936..1c3cf37 100644 --- a/lib/matplotex/figure/two_d.ex +++ b/lib/matplotex/figure/two_d.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Figure.TwoD do +@moduledoc false defstruct [:x, :y] def update(%__MODULE__{x: x, y: y} = twod, opts, context) do diff --git a/lib/matplotex/helpers.ex b/lib/matplotex/helpers.ex index 08ef9ea..cd52ba8 100644 --- a/lib/matplotex/helpers.ex +++ b/lib/matplotex/helpers.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Helpers do +@moduledoc false def copy(term) do text = if is_binary(term) do diff --git a/lib/matplotex/utils/algebra.ex b/lib/matplotex/utils/algebra.ex index 46268b6..56caa53 100644 --- a/lib/matplotex/utils/algebra.ex +++ b/lib/matplotex/utils/algebra.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Utils.Algebra do +@moduledoc false alias Nx @tensor_data_type_bits 64 diff --git a/lib/matplotex/utils/helpers.ex b/lib/matplotex/utils/helpers.ex index 92828b5..d57a033 100644 --- a/lib/matplotex/utils/helpers.ex +++ b/lib/matplotex/utils/helpers.ex @@ -1,16 +1,17 @@ defmodule Matplotex.Utils.Helpers do - @moduledoc """ - Module contains some misslenious helper functions - """ +@moduledoc false + # @moduledoc """ + # Module contains some misslenious helper functions + # """ - @doc """ - Input params may contains params for that chart struct and params for - content struct this functions sgregates that and return a tuple with - params for chart struct and content struct. - ### Params - * params - Map contains input params - * content_fields - list of atoms contains field names - """ + # @doc """ + # Input params may contains params for that chart struct and params for + # content struct this functions sgregates that and return a tuple with + # params for chart struct and content struct. + # ### Params + # * params - Map contains input params + # * content_fields - list of atoms contains field names + # """ @spec segregate_content(any(), list()) :: {any(), any()} def segregate_content(params, content_fields) do diff --git a/lib/matplotex/utils/input_error.ex b/lib/matplotex/utils/input_error.ex index c5b2067..7105505 100644 --- a/lib/matplotex/utils/input_error.ex +++ b/lib/matplotex/utils/input_error.ex @@ -1,3 +1,4 @@ defmodule Matplotex.InputError do +@moduledoc false defexception [:keys, :message] end diff --git a/lib/matplotex/utils/math_func.ex b/lib/matplotex/utils/math_func.ex index 7e7cdc1..09a23f1 100644 --- a/lib/matplotex/utils/math_func.ex +++ b/lib/matplotex/utils/math_func.ex @@ -1,4 +1,5 @@ defmodule Matplotex.Utilities.MathFunc do +@moduledoc false alias NX @tensor_double_data_type_bits 64 def euclidean_distance(x1, y1, x2, y2) do diff --git a/lib/matplotex/utils/svg.ex b/lib/matplotex/utils/svg.ex index 00afea0..c02610e 100644 --- a/lib/matplotex/utils/svg.ex +++ b/lib/matplotex/utils/svg.ex @@ -1,7 +1,6 @@ defmodule Matplotex.Utils.Svg do - @moduledoc """ - Modules to wrap function shares common svg functions - """ +@moduledoc false + def wrap_with_frame(%{width: width, height: height}, svg) do ~s(= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "bf2cfb75cd5c5006bec30141b131663299c661a864ec7fbbc72dfa557487a986"}, + "earmark_parser": {:hex, :earmark_parser, "1.4.42", "f23d856f41919f17cd06a493923a722d87a2d684f143a1e663c04a2b93100682", [:mix], [], "hexpm", "6915b6ca369b5f7346636a2f41c6a6d78b5af419d61a611079189233358b8b8b"}, "erlex": {:hex, :erlex, "0.2.7", "810e8725f96ab74d17aac676e748627a07bc87eb950d2b83acd29dc047a30595", [:mix], [], "hexpm", "3ed95f79d1a844c3f6bf0cea61e0d5612a42ce56da9c03f01df538685365efb0"}, + "ex_doc": {:hex, :ex_doc, "0.36.1", "4197d034f93e0b89ec79fac56e226107824adcce8d2dd0a26f5ed3a95efc36b1", [:mix], [{:earmark_parser, "~> 1.4.42", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "d7d26a7cf965dacadcd48f9fa7b5953d7d0cfa3b44fa7a65514427da44eafd89"}, + "makeup": {:hex, :makeup, "1.2.1", "e90ac1c65589ef354378def3ba19d401e739ee7ee06fb47f94c687016e3713d1", [:mix], [{:nimble_parsec, "~> 1.4", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "d36484867b0bae0fea568d10131197a4c2e47056a6fbe84922bf6ba71c8d17ce"}, + "makeup_elixir": {:hex, :makeup_elixir, "1.0.1", "e928a4f984e795e41e3abd27bfc09f51db16ab8ba1aebdba2b3a575437efafc2", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.2.3 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "7284900d412a3e5cfd97fdaed4f5ed389b8f2b4cb49efc0eb3bd10e2febf9507"}, + "makeup_erlang": {:hex, :makeup_erlang, "1.0.1", "c7f58c120b2b5aa5fd80d540a89fdf866ed42f1f3994e4fe189abebeab610839", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}], "hexpm", "8a89a1eeccc2d798d6ea15496a6e4870b75e014d1af514b1b71fa33134f57814"}, + "nimble_parsec": {:hex, :nimble_parsec, "1.4.0", "51f9b613ea62cfa97b25ccc2c1b4216e81df970acd8e16e8d1bdc58fef21370d", [:mix], [], "hexpm", "9c565862810fb383e9838c1dd2d7d2c437b3d13b267414ba6af33e50d2d1cf28"}, "nx": {:hex, :nx, "0.7.3", "51ff45d9f9ff58b616f4221fa54ccddda98f30319bb8caaf86695234a469017a", [:mix], [{:complex, "~> 0.5", [hex: :complex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "5ff29af84f08db9bda66b8ef7ce92ab583ab4f983629fe00b479f1e5c7c705a6"}, "telemetry": {:hex, :telemetry, "1.2.1", "68fdfe8d8f05a8428483a97d7aab2f268aaff24b49e0f599faa091f1d4e7f61c", [:rebar3], [], "hexpm", "dad9ce9d8effc621708f99eac538ef1cbe05d6a874dd741de2e689c47feafed5"}, }