Statistics graphic

The add_stat_graph() method allows to add a bar containing a graphic including the mean and standard deviation along the provided axis.
The statistic graphic y-axis limits can be set through the y_limits parameter.
Add a graphic containing mean/std for each X or Y box.

This kind of graphic might be added to:
  * Geographical box plots
  * Scatter plots
  * 2D binned statistics plots

Parameters
----------
for_axis
    Name of the axis for which to compute and display this graphic (X or Y).
    Default value is the x-axis (X).
position
    Position of the stat graph (top, bottom, left, right) (default to top).
y_limits
    Limits for the "y-axis" of the stat graphic to add.
params
    Bar's parameters.
from casys import CasysPlot, PlotParams

plot = CasysPlot(
    data=ad,
    data_name="SLA box stat",
    stat="std",
    plot_params=PlotParams(color_limits=(0, 1)),
)

# Graphic for the x-axis on the bottom
plot.add_stat_graph(for_axis="x", position="bottom", y_limits=(-150, 300))

# Graphic for the y-axis on the left
plot.add_stat_graph(for_axis="y", position="left")

plot.show()
../_images/stat_graph_2_0.png

Note

When using the add_plot() method, y_limits parameter value is specific to each stat_graph plot.