I don't get it:
I'm trying to just do a sample graph:
a = pd.DataFrame(np.random.randn(100, 4), columns=['a', 'b', 'c', 'd'])
a.iplot(kind='line', y='a')
not a very complex example.
apparently, there is:
in practice the whole online / offline is not clear because half of the web content seems to be about older versions.
but, when I just use plotly to output something, I get a browser tab with my plot. since it opens an url, is that online or offline mode? no idea
to do this I have to import from plotly import graph_objs as go and not import plotly.graph_objects as go like written in the documentation because that doesn't work. not really sure why there are two different objects with almost the same name...
enters cufflink where when I copy paste samples (from this articles: https://medium.com/@kbrook10/day-7-data-visualization-how-to-use-plotly-and-cufflinks-for-interactive-data-visualizations-3a4b85fdd999) it will complain about a missing filename / url.
It looks like this:

so, I go to 'offline' mode:
cf.go_offline()
well, no, same error..
in the end, all I want is dataframe->plots; and eventually doing interactive plots, which is why I'm going away from matplot lib.
I'd be very grateful if someone could explain the different versions, why naming seems to change, etc and how I can use cufflink to make that dataframe->plot thing work ;)
I'm sorry the situation is so confusing, let me try to clear it up...
plotly which behaves somewhat differently from version 3. Here's the announcement and here's the migration guide.chart_studio)fig.show() to render a figure this is working in what used to be called offline mode: nothing is uploaded anywhere.plotly.graph_objects as an alias for plotly.graph_objs as it's easier to say. Both work and do the exact same thing but for some reason certain versions of PyCharm don't do auto-completion on the newer one, and we're working on a fix.plotly from a dataframe is to use plotly.expresskaleido or orca that returns PNGs or SVGs. This means that when you use version 4 and a browser window opens, this is in offline mode and no data has left your computer.cufflinks is a third-party module whose latest version at the moment (july 2019) was built to work with plotly version 3 and not yet upgraded to work with the new version 4 features and so it still has the notion of online vs offline. (update January 2021: cufflinks works with Plotly v4 since around September 2019, but Plotly Express has since been upgraded to support a pandas-like API just like cufflinks and is now the recommended way to do things)Hopefully that clears things up.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With