Plot - Radard chart

from __future__ import division, unicode_literals

from matplotlib import pyplot as plt
from numpy import array

from gemseo.api import configure_logger
from gemseo.core.dataset import Dataset
from gemseo.post.dataset.radar_chart import RadarChart

configure_logger()

Out:

<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"]

Plot the two series on a radar chart

We can use the RadarChart plot:

plot = RadarChart(dataset)
plot.rmin = -0.5
plot.rmax = 1.0
plot.execute(show=False, save=False, connect=True, radial_ticks=True)
# Workaround for HTML rendering, instead of ``show=True``
plt.show()
plot radar chart

Out:

/home/docs/checkouts/readthedocs.org/user_builds/gemseo/conda/3.1.0/lib/python3.8/site-packages/gemseo/post/dataset/dataset_plot.py:383: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
  sub_figure.tight_layout()

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

Gallery generated by Sphinx-Gallery