Note
This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.
ExperimentData.add_figures¶
- ExperimentData.add_figures(figures, figure_names=None, overwrite=False, save_figure=None)[source]¶
Add the experiment figure.
- Parameters:
figures (str or bytes or pyplot.Figure or list) – Paths of the figure files or figure data.
figure_names (str or list) – Names of the figures. If
None
, use the figure file names, if given, or a generated name. If figures is a list, then figure_names must also be a list of the same length orNone
.overwrite (bool) – Whether to overwrite the figure if one already exists with the same name.
save_figure (bool) – Whether to save the figure in the database. If
None
, theauto-save
attribute is used.
- Returns:
Figure names.
- Return type:
str or list
- Raises:
ExperimentEntryExists – If the figure with the same name already exists, and overwrite=True is not specified.
ValueError – If an input parameter has an invalid value.