Plot - Bars

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.bars import BarPlot

configure_logger()

Out:

<RootLogger root (INFO)>

Build a dataset

dataset = Dataset()
dataset.add_variable("x1", array([[0.25, 0.35], [0.75, 0.85]]))
dataset.add_variable("x2", array([[0.5], [0.5]]))
dataset.add_variable("x3", array([[0.75], [0.25]]))
dataset.row_names = ["series_1", "series_2"]

Plot the two series on a radar chart

We can use the BarPlot plot

plot = BarPlot(dataset)
plot.colormap = "PiYG"
plot.execute(save=False, show=False)
# Workaround for HTML rendering, instead of ``show=True``
plt.show()
plot bars

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

Gallery generated by Sphinx-Gallery