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.figure

ExperimentData.figure(figure_key, file_name=None)[source]

Retrieve the specified experiment figure.

Parameters:
  • figure_key (Union[str, int]) – Name or index of the figure.

  • file_name (Optional[str]) – Name of the local file to save the figure to. If None, the content of the figure is returned instead.

Return type:

Union[int, FigureData]

Returns:

The size of the figure if file_name is specified. Otherwise the content of the figure as a FigureData object.

Raises:

ExperimentEntryNotFound – If the figure cannot be found.