@@ -225,6 +225,8 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
225
225
from plotly.offline import init_notebook_mode, iplot
226
226
init_notebook_mode()
227
227
iplot([{'x': [1, 2, 3], 'y': [5, 2, 7]}])
228
+ # We can also download an image of the plot by setting `image=True`
229
+ iplot([{'x': [1, 2, 3], 'y': [5, 2, 7]}], image=True)
228
230
```
229
231
"""
230
232
if not __PLOTLY_OFFLINE_INITIALIZED :
@@ -286,6 +288,9 @@ def plot(figure_or_data,
286
288
import plotly.graph_objs as go
287
289
288
290
plot([go.Scatter(x=[1, 2, 3], y=[3, 2, 6])], filename='my-graph.html')
291
+ # We can also download an image of the plot by setting `image=True`
292
+ plot([go.Scatter(x=[1, 2, 3], y=[3, 2, 6])], filename='my-graph.html'
293
+ image=True)
289
294
```
290
295
More examples below.
291
296
@@ -536,12 +541,12 @@ def iplot_mpl(mpl_fig, resize=False, strip_style=False,
536
541
has become outdated with your version of
537
542
graph_reference.json or if you need to include
538
543
extra, unnecessary keys in your figure.
539
- downloage_image (default=False) -- If True, the image of the current plot
540
- will be downloaded.
544
+ image (default=False) -- If True, the image of the current plot will be
545
+ downloaded.
541
546
_format (default='png') -- Specifies the format of the image to be
542
547
downloaded if `downlowad_image` is True.
543
- image_filename (default='plot_image') -- Sets the name of the file your image
544
- will be saved to. The extension should not be included.
548
+ image_filename (default='plot_image') -- Sets the name of the file your
549
+ image will be saved to. The extension should not be included.
545
550
_height (default=600) -- Specifies the height of the image in `px`.
546
551
_width (default=800) -- Specifies the width of the image in `px`.
547
552
@@ -616,7 +621,7 @@ def download_notebook_image(format='png', height=600, width=800,
616
621
height -- sets the height of the image in px (default=600)
617
622
width -- sets the width of the image in px (default=800)
618
623
filename -- the name of the saved file without format extension
619
- (default='newplot ')
624
+ (default='plot_image ')
620
625
"""
621
626
script = ('<script>'
622
627
'function downloadimage(format, height, width,'
0 commit comments