Skip to content

Commit ed9c3a3

Browse files
Merge pull request #29 from BigThinkcode/docs
Docs
2 parents 958880e + 1e73b3f commit ed9c3a3

File tree

2 files changed

+32
-33
lines changed

2 files changed

+32
-33
lines changed

lib/matplotex.ex

Lines changed: 27 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ defmodule Matplotex do
66
77
## Supported Graph Types
88
9-
Matplotex supports the following types of visualizations:
10-
11-
- Line Plots
12-
- Bar Charts
13-
- Pie Charts
14-
- Spline Graphs
15-
- Histograms
16-
- Scatter Plots
17-
## Examples
9+
Matplotex supports the following types of visualizations:
10+
11+
- Line Plots
12+
- Bar Charts
13+
- Pie Charts
14+
- Spline Graphs
15+
- Histograms
16+
- Scatter Plots
17+
## Examples
1818
```elixir
1919
alias Matplotex as: M
2020
@@ -86,35 +86,35 @@ Matplotex supports the following types of visualizations:
8686
**Note**: Both approaches are equivalent, and users can choose whichever pattern is more convenient.
8787
8888
89-
## Runtime Configuration (RC Params)
90-
The function M.set_rc_params/2 allows you to set runtime configuration parameters for the plot, such as font sizes, colors, and line styles. These settings affect visual elements like the font style and size for the labels, ticks, and title.
89+
## Runtime Configuration (RC Params)
90+
The function M.set_rc_params/2 allows you to set runtime configuration parameters for the plot, such as font sizes, colors, and line styles. These settings affect visual elements like the font style and size for the labels, ticks, and title.
9191
92-
By default, the plot starts with standard values (e.g., Arial or Verdana font, size 12). You can modify these using the RC parameters.
92+
By default, the plot starts with standard values (e.g., Arial or Verdana font, size 12). You can modify these using the RC parameters.
9393
94-
### Available RC Params:
95-
line_width, line_style
96-
grid_color, grid_linestyle, grid_alpha
97-
tick_line_length
98-
x_padding, y_padding, padding
99-
legend_width
100-
Refer to specific plot documentation for detailed information on padding usage.
94+
### Available RC Params:
95+
line_width, line_style
96+
grid_color, grid_linestyle, grid_alpha
97+
tick_line_length
98+
x_padding, y_padding, padding
99+
legend_width
100+
Refer to specific plot documentation for detailed information on padding usage.
101101
102102
103103
## Elements
104104
The output format of the plot is SVG will support more formats in future, anyway the svg is a group of some elements put together, throught the execution
105105
it is generating those elements through elixir data structure, all element data structure contains some svg equivalent data that converts the elements to
106106
SVG string, the output SVG string can be used directly in the web application.
107107
108-
## Figure Data Structure
109-
The main data structure used to generate a plot is Matplotex.Figure, which contains all the necessary information for the plot, including:
108+
## Figure Data Structure
109+
The main data structure used to generate a plot is Matplotex.Figure, which contains all the necessary information for the plot, including:
110110
111-
- `:figsize`: A tuple specifying the width and height of the figure (e.g., {10, 6}).
112-
- `:axes`: Contains the axes data, which varies depending on the plot type.
113-
- `:rc_params`: The runtime configuration parameters.
114-
- `:margin`: Specifies the margin of the figure.
111+
- `:figsize`: A tuple specifying the width and height of the figure (e.g., {10, 6}).
112+
- `:axes`: Contains the axes data, which varies depending on the plot type.
113+
- `:rc_params`: The runtime configuration parameters.
114+
- `:margin`: Specifies the margin of the figure.
115115
116-
## `M.show/1`
117-
After creating a figure using the functions provided, call M.show/1 to generate and display the final SVG representation of the plot. The show/1 function will convert the Matplotex.Figure data into a valid SVG string.
116+
## `M.show/1`
117+
After creating a figure using the functions provided, call M.show/1 to generate and display the final SVG representation of the plot. The show/1 function will convert the Matplotex.Figure data into a valid SVG string.
118118
119119
120120
"""
@@ -207,7 +207,6 @@ After creating a figure using the functions provided, call M.show/1 to generate
207207
|> BarChart.create({pos, values, width}, opts)
208208
end
209209

210-
211210
@doc """
212211
Creates a scatter plot based on the given `x` and `y` values, with optional customization provided via `opts`.
213212
@@ -667,7 +666,6 @@ After creating a figure using the functions provided, call M.show/1 to generate
667666
668667
"""
669668

670-
671669
def figure(figure, params) do
672670
Figure.update_figure(figure, params)
673671
end

mix.exs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ defmodule Matplotex.MixProject do
44
def project do
55
[
66
app: :matplotex,
7-
87
organization: :bigthinkcode,
98
version: "0.1.0",
109
elixir: "~> 1.17",
@@ -14,17 +13,18 @@ defmodule Matplotex.MixProject do
1413
package: package()
1514
]
1615
end
16+
1717
defp package do
1818
[
1919
description: "A library for generating plots in Elixir.",
2020
licenses: ["MIT"],
2121
links: %{
2222
"GitHub" => "https://github.com/bigthinkcode/matplotex"
2323
},
24-
maintainers: ["BigThinkCode", "Mohammed Sadique P", "Karthikeyan Mayilvahanam"],
25-
24+
maintainers: ["BigThinkCode", "Mohammed Sadique P", "Karthikeyan Mayilvahanam"]
2625
]
2726
end
27+
2828
defp elixirc_paths(:test), do: elixirc_paths(:dev) ++ ["test/support"]
2929
defp elixirc_paths(_), do: ["lib"]
3030

@@ -42,7 +42,8 @@ defmodule Matplotex.MixProject do
4242
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
4343
{:csv, "~> 3.2"},
4444
{:nx, "~> 0.7.3"},
45-
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false}
45+
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
46+
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
4647
]
4748
end
4849
end

0 commit comments

Comments
 (0)