You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/matplotex.ex
+27-29Lines changed: 27 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ defmodule Matplotex do
6
6
7
7
## Supported Graph Types
8
8
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
18
18
```elixir
19
19
alias Matplotex as: M
20
20
@@ -86,35 +86,35 @@ Matplotex supports the following types of visualizations:
86
86
**Note**: Both approaches are equivalent, and users can choose whichever pattern is more convenient.
87
87
88
88
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.
91
91
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.
93
93
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.
101
101
102
102
103
103
## Elements
104
104
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
105
105
it is generating those elements through elixir data structure, all element data structure contains some svg equivalent data that converts the elements to
106
106
SVG string, the output SVG string can be used directly in the web application.
107
107
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:
110
110
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.
115
115
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.
118
118
119
119
120
120
"""
@@ -207,7 +207,6 @@ After creating a figure using the functions provided, call M.show/1 to generate
207
207
|>BarChart.create({pos,values,width},opts)
208
208
end
209
209
210
-
211
210
@doc"""
212
211
Creates a scatter plot based on the given `x` and `y` values, with optional customization provided via `opts`.
213
212
@@ -667,7 +666,6 @@ After creating a figure using the functions provided, call M.show/1 to generate
0 commit comments