Reputation: 77
my problem is that the plotly python plot method
plot_url = py.plot(fig, filename='box-plot')
automatically launch the web browser, is it possible to prevent this behaviour ?
Thanks for your answers!
Upvotes: 1
Views: 8413
Reputation: 149
Just to add on this. import plotly.plotly as py
will not work anymore.
plotly.plotly
is deprecated.
Need to install chart_studio
python2 -m pip install chart-studio
This will change into
import chart_studio.plotly as py
Upvotes: 1
Reputation: 61
Another way is to use py.iplot
plot_url = py.iplot(fig, filename='box-plot')
I had it this way and wanted it to actually show me the graph. So then I took away the 'i' to match your example and it worked :P
Upvotes: 1
Reputation: 6478
Plotly for Python can be configured to render locally inside Jupyter (IPython) notebooks, locally inside your web browser, or remotely in your online Plotly account.
Offline mode will save an HTML file locally and open it inside your web browser.
plot() takes options:
auto_open (default=True) -- Toggle browser options
* True: open this plot in a new browser tab
* False: do not open plot in the browser, but do return the unique
plot_url = py.plot(fig, filename='box-plot', auto_open=False)
Upvotes: 8