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
it is generating those elements through elixir data structure, all element data structure contains some svg equivalent data that converts the elements to
111
111
SVG string, the output SVG string can be used directly in the web application.
112
112
113
+
## Figure
114
+
The execution a plot carriec out by a data structure named Matplotex.Figure it holds all the adequate information to generate a figure it containst the keys
115
+
`:figsize` - is a tuple carries width and height of the figure eg: {10,6}
116
+
`:axes` - is another object that will varie according to the plot
117
+
`:rc_params` - the runtime configurations
118
+
`:margin` - the margin of the figure
119
+
120
+
## M.show/1
121
+
All examples above using this function `M.show/1` after a plot generation API call
122
+
The all APIs from this module is ment to return an svg equivalent Data Matplotex.Figure with distinct object associated with the `axes` key, so to convert that data to
123
+
an SVG chart use `M.show/1`
113
124
114
125
"""
115
126
aliasMatplotex.Figure.Areal.Spline
@@ -121,7 +132,36 @@ defmodule Matplotex do
121
132
aliasMatplotex.Figure.Sketch
122
133
aliasMatplotex.Figure
123
134
aliasMatplotex.Figure.Areal.BarChart
135
+
@doc"""
136
+
Generates a bar chart using the provided values and bar widths.
137
+
138
+
## Parameters
139
+
140
+
- `values` (list of numbers): A list of numerical values representing the heights of the bars in the chart.
141
+
- `width` (floatiung point number): The width of each bar in inches.
142
+
- `opts` (keyword list): It will support all opts mentioned above, some bar specific options are there those are
143
+
- `:label` (string): Label for specific dataset passed on first argument.
144
+
- `:color` (string): Color of the bar.
145
+
- `:edge_color` (string): Color of the edge of the bar.
Adds an additional dataset to a bar plot in the given `%Figure{}`.
182
+
183
+
This function allows you to append multiple datasets to a bar plot by providing new values and corresponding options. Each dataset can be customized with options such as color, label, and bar width.
184
+
185
+
## Parameters
140
186
187
+
- `figure` (%Figure{}): The figure to which the new dataset will be added.
188
+
- `values` (list): A list of numerical values representing the heights of the bars in the new dataset.
189
+
- `width` (float): The width of the bars in the dataset.
190
+
- `opts` (keyword list, optional): A set of options for customizing the appearance of the new dataset, such as color and label.
191
+
192
+
## Usage
193
+
194
+
This function is used when generating multi-bar plots to represent data from multiple datasets. Here's an example demonstrating its usage:
Adds an additional dataset to a scatter plot in the given `%Figure{}`.
248
+
249
+
This function allows you to overlay multiple scatter plots on the same figure by providing new `x` and `y` values, along with customization options via `opts`.
161
250
251
+
## Parameters
252
+
253
+
- `figure` (%Figure{}): The figure to which the new dataset will be added.
254
+
- `x` (list): A list of numerical values representing the x-coordinates of the new dataset.
255
+
- `y` (list): A list of numerical values representing the y-coordinates of the new dataset.
256
+
- `opts` (keyword list, optional): A set of options for customizing the appearance of the new dataset, such as color, marker style, line style, and labels.
257
+
258
+
## Usage
259
+
260
+
This function is typically used when you want to generate multi-pattern scatter plots with multiple datasets. The following example demonstrates its usage:
0 commit comments