Documentation opens every time I make a plot

I’m running a python script on a cron job (ubuntu server in python virtualenv) and every time I generate a plot I am greeted with the documentation (at bottom; opens in w3m via SSH), which blocks my script from finishing. What’s frustrating is the plot is being uploaded and is visible from my online profile. How do it set this to not open EVERY time i generate a plot?
I’ve done theβ€˜DemoAccount’, api_key=β€˜lr19g7zw81’) #with actual credentials


import plotly
import pandas as pd

data = pd.read_csv(β€˜data’)
t1 = plotly.graph_objs.Scatter(name=β€˜Value’, x=data.DateTime, y=data.Value, line=plotly.graph_objs.Line(color=β€˜blue’))
t2 = plotly.graph_objs.Scatter(name=β€˜Value 2’, x=data.DateTime, y=data.Value2, yaxis=β€˜y2’, line=plotly.graph_objs.Line(color=β€˜green’))
data = [t1, t2, t3, t4, t5]
layout = {β€˜title’: β€œgraph”,
β€˜yaxis’: {β€˜title’: β€œValue”, β€˜domain’:[0.5,1]},
β€˜yaxis2’: {β€˜title’: β€œValue2”, β€˜domain’:[0.0, 0.5]},
β€˜xaxis’: {β€˜anchor’:β€˜y2’}}
fig = plotly.graph_objs.Figure(data=data, layout=layout)
plotly.offline.plot(fig, filename=β€˜figure.html’, auto_open=False)
plotly.plotly.plot(fig, filename=β€˜Figure’)

Feed Pricing Make a Chart
Feed Pricing Make a Chart Help
Sign In Sign up Upgrade

Plotly is the collaboration platform for modern data science.

Set up a private Plotly cloud at your company.


β€’ API Home
β€’ Python
β€’ R
β€’ JavaScript

Hi there,

I was unable to reproduce the error on my end (I was using Python 2/3 on OS X) but I have a few suspicious about why the documentation is popping up.

Firstly, why is the plot being generated twice at the bottom there?

plotly.offline.plot(fig, filename='figure.html', auto_open=False)
plotly.plotly.plot(fig, filename='Figure')

Try removing one of those and see what you get.

Also, and a separate question, but have you defined t3, t4 and t5 at an earlier point in the script? I had to just use data = [t1, t2] to make my script work.

Hey thanks,

I actually figured this out a day or two ago and forgot about this post - auto_open needed to be set to false for the online plot (i wanted an offline and online copy on every script run). Since there were no graphical browsers installed, it was opening the web page in the same terminal the script was running in and blocking the remainder of the script

[t3, t4, t5] were all there, it was just a shoddily simplified version of my code