How to save


Plots can be saved to multiple image formats using plotly’s fig.write_image().

from orion.client import get_experiment

# flake8: noqa

# Specify the database where the experiments are stored. We use a local PickleDB here.
storage = dict(type="legacy", database=dict(type="pickleddb", host="../../db.pkl"))

# Load the data for the specified experiment
experiment = get_experiment("2-dim-exp", storage=storage)
fig = experiment.plot.regret()

See plotly’s short tutorial for more examples.


Using write_image is convenient for static images that can be included in PDF articles but it looses all advantages of plotly’s interactive plots. You can save an HTML version instead using fig.write_html() if you wish to keep an interactive version of the plot.



Plots can also be saved to json using fig.to_json(). This is the format used by the Web API for instance.


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

Gallery generated by Sphinx-Gallery