radar
AeroViz.plot.radar
Attributes
data
module-attribute
data = [[0.88, 0.01, 0.03, 0.03, 0.0, 0.06, 0.01, 0.0], [0.07, 0.95, 0.04, 0.05, 0.0, 0.02, 0.01, 0.0], [0.01, 0.02, 0.85, 0.19, 0.05, 0.1, 0.0, 0.0], [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.0], [0.01, 0.01, 0.02, 0.71, 0.74, 0.7, 0.3, 0.2]]
Classes
Color
Unit
Functions
set_figure
set_figure(func=None, *, figsize: tuple | None = None, fs: int | None = None, fw: str = None, autolayout: bool = True)
auto_label_pct
auto_label_pct(pct, symbol: bool = True, include_pct: bool = False, ignore: Literal['inner', 'outer'] = 'inner', value: float = 2)
linear_regression_base
linear_regression_base(x_array: ndarray, y_array: ndarray, columns: str | list[str] | None = None, positive: bool = True, fit_intercept: bool = True)
radar_factory
Create a radar chart with num_vars axes.
This function creates a RadarAxes projection and registers it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_vars
|
int
|
Number of variables for radar chart. |
required |
frame
|
(circle, polygon)
|
Shape of frame surrounding axes. |
'circle'
|
radar
Creates a radar chart based on the provided data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
list of list
|
A 2D list where each inner list represents a factor, and each element within the inner lists represents a value for a species. Shape: (n_factors, n_species) Example: [[0.88, 0.01, 0.03, ...], [0.07, 0.95, 0.04, ...], ...] |
required |
labels
|
list
|
A list of strings representing the names of species (variables).
If provided, it should have the same length as the number of elements
in each inner list of |
None
|
legend_labels
|
list
|
A list of strings for labeling each factor in the legend.
If provided, it should have the same length as the number of inner lists in |
None
|
**kwargs
|
dict
|
Additional keyword arguments to be passed to the plotting function. This may include 'title' for setting the chart title. |
{}
|
Returns:
| Type | Description |
|---|---|
tuple[Figure, Axes]
|
A tuple containing the Figure and Axes objects of the created plot. |
Example
data = [[0.88, 0.01, 0.03, 0.03, 0.00, 0.06, 0.01, 0.00], [0.07, 0.95, 0.04, 0.05, 0.00, 0.02, 0.01, 0.00], [0.01, 0.02, 0.85, 0.19, 0.05, 0.10, 0.00, 0.00], [0.02, 0.01, 0.07, 0.01, 0.21, 0.12, 0.98, 0.00], [0.01, 0.01, 0.02, 0.71, 0.74, 0.70, 0.30, 0.20]] labels = ['Sulfate', 'Nitrate', 'EC', 'OC1', 'OC2', 'OP', 'CO', 'O3'] fig, ax = radar(data, labels=labels, title='Basecase')
Note
The first dimension of data represents each factor, while the second
dimension represents each species.