import pandas as pd
import numpy as np
import plotly.tools as tls
import plotly.plotly as py
import cufflinks as cf
x = np.random.standard_normal(80).reshape((20, 4))
df = pd.DataFrame(x, columns=['A', 'B', 'C', 'D'])
First save the plot in the user folder root.
df.iplot(kind='scatter', width=2, colorscale="dflt", theme='ggplot', filename='testing')
That worked nicely.
Now, I'll try saving in a new folder
df.iplot(kind='scatter', width=2, colorscale="dflt", theme='ggplot', filename='myNewFolder/testing')
--------------------------------------------------------------------------- PlotlyError Traceback (most recent call last) <ipython-input-11-b899afb2bb86> in <module>() ----> 1 df.iplot(kind='scatter', width=2, colorscale="dflt", theme='ggplot', filename='myNewFolder/testing') /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/cufflinks/plotlytools.py in _iplot(self, data, layout, filename, sharing, kind, title, xTitle, yTitle, zTitle, theme, colors, colorscale, fill, width, dash, mode, symbol, size, barmode, sortbars, bargap, bargroupgap, bins, histnorm, histfunc, orientation, boxpoints, annotations, keys, bestfit, bestfit_colors, mean, mean_colors, categories, x, y, z, text, gridcolor, zerolinecolor, margin, labels, values, secondary_y, subplots, shape, error_x, error_y, error_type, locations, lon, lat, asFrame, asDates, asFigure, asImage, dimensions, asPlot, asUrl, online, **kwargs) 955 return py.plot(figure,sharing=sharing,filename=filename,validate=validate,auto_open=False) 956 else: --> 957 return iplot(figure,sharing=sharing,filename=filename,validate=validate,online=online) 958 959 /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/cufflinks/plotlytools.py in iplot(data_or_figure, validate, sharing, filename, online, **kwargs) 1099 filename='Plotly Playground {0}'.format(time.strftime("%Y-%m-%d %H:%M:%S")) 1100 return py.iplot(data_or_figure,validate=validate,sharing=sharing, -> 1101 filename=filename) 1102 1103 def _ta_figure(self,**kwargs): /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in iplot(figure_or_data, **plot_options) 149 if 'auto_open' not in plot_options: 150 plot_options['auto_open'] = False --> 151 url = plot(figure_or_data, **plot_options) 152 153 if isinstance(figure_or_data, dict): /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in plot(figure_or_data, validate, **plot_options) 239 240 plot_options = _plot_option_logic(plot_options) --> 241 res = _send_to_plotly(figure, **plot_options) 242 if res['error'] == '': 243 if plot_options['auto_open']: /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in _send_to_plotly(figure, **plot_options) 1429 1430 if 'error' in r and r['error'] != '': -> 1431 raise exceptions.PlotlyError(r['error']) 1432 1433 # Check if the url needs a secret key PlotlyError: Error: One or more folders cannot be saved. You have reached the limit of the number of folders you can create with your subscription. If you would like to create more folders, please upgrade your account at https://plot.ly/settings/subscription.
In the cufflinks help says:
All the charts are created as private by default. To make them public you can use world_readable=True
So, let's try with the world_readable option.
df.iplot(kind='scatter', width=2, colorscale="dflt", theme='ggplot', filename='myNewFolder/testing',
world_readable=True)
--------------------------------------------------------------------------- PlotlyError Traceback (most recent call last) <ipython-input-12-b6a2535741c5> in <module>() 1 df.iplot(kind='scatter', width=2, colorscale="dflt", theme='ggplot', filename='myNewFolder/testing', ----> 2 world_readable=True) /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/cufflinks/plotlytools.py in _iplot(self, data, layout, filename, sharing, kind, title, xTitle, yTitle, zTitle, theme, colors, colorscale, fill, width, dash, mode, symbol, size, barmode, sortbars, bargap, bargroupgap, bins, histnorm, histfunc, orientation, boxpoints, annotations, keys, bestfit, bestfit_colors, mean, mean_colors, categories, x, y, z, text, gridcolor, zerolinecolor, margin, labels, values, secondary_y, subplots, shape, error_x, error_y, error_type, locations, lon, lat, asFrame, asDates, asFigure, asImage, dimensions, asPlot, asUrl, online, **kwargs) 955 return py.plot(figure,sharing=sharing,filename=filename,validate=validate,auto_open=False) 956 else: --> 957 return iplot(figure,sharing=sharing,filename=filename,validate=validate,online=online) 958 959 /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/cufflinks/plotlytools.py in iplot(data_or_figure, validate, sharing, filename, online, **kwargs) 1099 filename='Plotly Playground {0}'.format(time.strftime("%Y-%m-%d %H:%M:%S")) 1100 return py.iplot(data_or_figure,validate=validate,sharing=sharing, -> 1101 filename=filename) 1102 1103 def _ta_figure(self,**kwargs): /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in iplot(figure_or_data, **plot_options) 149 if 'auto_open' not in plot_options: 150 plot_options['auto_open'] = False --> 151 url = plot(figure_or_data, **plot_options) 152 153 if isinstance(figure_or_data, dict): /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in plot(figure_or_data, validate, **plot_options) 239 240 plot_options = _plot_option_logic(plot_options) --> 241 res = _send_to_plotly(figure, **plot_options) 242 if res['error'] == '': 243 if plot_options['auto_open']: /home/jjd/Anaconda/envs/Python3/lib/python3.5/site-packages/plotly/plotly/plotly.py in _send_to_plotly(figure, **plot_options) 1429 1430 if 'error' in r and r['error'] != '': -> 1431 raise exceptions.PlotlyError(r['error']) 1432 1433 # Check if the url needs a secret key PlotlyError: Error: One or more folders cannot be saved. You have reached the limit of the number of folders you can create with your subscription. If you would like to create more folders, please upgrade your account at https://plot.ly/settings/subscription.