.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "examples/dataset/plot_radar_chart.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_examples_dataset_plot_radar_chart.py: Plot - Radard chart =================== .. GENERATED FROM PYTHON SOURCE LINES 28-40 .. code-block:: default 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() .. rst-class:: sphx-glr-script-out Out: .. code-block:: none .. GENERATED FROM PYTHON SOURCE LINES 41-43 Build a dataset --------------- .. GENERATED FROM PYTHON SOURCE LINES 43-49 .. code-block:: default 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"] .. GENERATED FROM PYTHON SOURCE LINES 50-53 Plot the two series on a radar chart ------------------------------------ We can use the :class:`~gemseo.post.dataset.radar_chart.RadarChart` plot: .. GENERATED FROM PYTHON SOURCE LINES 53-59 .. code-block:: default 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() .. image:: /examples/dataset/images/sphx_glr_plot_radar_chart_001.png :alt: plot radar chart :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out Out: .. code-block:: none /home/docs/checkouts/readthedocs.org/user_builds/gemseo/conda/3.2.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() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.171 seconds) .. _sphx_glr_download_examples_dataset_plot_radar_chart.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_radar_chart.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_radar_chart.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_