How to share with chart studio¶
This tutorial explains how to share plots using chart studio. This method that was used to share plots on the WordPress blog-post: Improved Deep Learning Workflows Through Hyperparameter Optimization with Oríon.
Uploading to Chart Studio¶
import chart_studio # flake8: noqa username = "<your username>" api_key = "<your api_key>" chart_studio.tools.set_credentials_file(username=username, api_key=api_key)
This will create a credential file locally that will be used in next step.
Next you can create a
figure and save it to Chart Studio.
# # Push your visualiztion to your account using the following lines of code: # 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")) fig = experiment.plot.regret() import chart_studio.plotly as py py.plot(fig, filename="regret")
The plot will be saved under the name
regret in your
Chart Studio profile.
Here is one example that was used in the blog-post mentioned earlier:
Sharing on WordPress¶
With Chart Studio,
you can get an sharing URL for an embedded plot. In the Viewer page of Chart Studio,
click on export and then Embed URL. This should bring you to a page with an URL
https://chart-studio.plotly.com/~<your username>/<plot id>.embed.
With the WordPress plugin iframe, you can embed your plot in a blog post. For example, the first plot in our blog-post is embedded with the following snippet.
Total running time of the script: ( 0 minutes 0.000 seconds)