exa.core.plotting.plots.plot_bar_chart

Contents

exa.core.plotting.plots.plot_bar_chart#

plot_bar_chart(observations, observation_type, split_dut_field=<function decode_dut_field>, save_path=None, one_per_dut_field=True, resolution=300)#

Draw a bar chart for the latest observations of a given type.

Bar chart - a bar shows an observation value for each component This has multiple functionalities depending on the number of values of the same type provided. - If the number of values is exactly one, a bar chart is plotted for the observations of the given observation_type. - If the number of values is larger than one a box-and-whiskers plot is drawn.

Parameters:
  • observations (list[LocalObservation | ObservationData]) – The data to plot. The objects must have a created_timestamp.

  • observation_type (str) – The type to plot.

  • split_dut_field (Callable[[str], tuple[str, str]]) – How to extract component name and observation type from DUT field.

  • save_path (Path | None) – Where to save the figure.

  • one_per_dut_field (bool) – Only take the latest observation per DUT field.

  • resolution (int) – In dpi for saving the figure.

Returns:

The Matplotlib figure containing the plot.

Raises:

ValueError if observation type can't be found in observations. –

Return type:

Figure