Radar chart

from __future__ import annotations

from gemseo import configure_logger
from gemseo.datasets.dataset import Dataset
from gemseo.post.dataset.radar_chart import RadarChart
from numpy import array

<RootLogger root (INFO)>

Build a dataset

dataset = Dataset()
dataset.add_variable("x1", array([[0.2, 0.4, 0.5], [0.1, 0.3, 0.5]]))
dataset.add_variable("x2", array([[0.6], [0.5]]))
dataset.add_variable("x3", array([[0.8], [0.7]]))
dataset.row_names = ["series_1", "series_2"]
/home/docs/checkouts/readthedocs.org/user_builds/gemseo/checkouts/5.0.1/doc_src/_examples/dataset/visualization/plot_radar_chart.py:43: UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access
  dataset.row_names = ["series_1", "series_2"]

Plot the two series on a radar chart

We can use the RadarChart plot:

plot = RadarChart(dataset, connect=True, radial_ticks=True)
plot.rmin = -0.5
plot.rmax = 1.0
plot.execute(save=False, show=True)
plot radar chart
[<Figure size 640x480 with 1 Axes>]

Total running time of the script: ( 0 minutes 0.139 seconds)

Gallery generated by Sphinx-Gallery