Skip to content

Commit bd46038

Browse files
committed
more docstring fixes and amending examples
1 parent d447ae4 commit bd46038

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

plotly/offline/offline.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
211211
has become outdated with your version of
212212
graph_reference.json or if you need to include
213213
extra, unnecessary keys in your figure.
214-
downloage_image (default=False) -- If True, the image of the current plot
214+
image (default=False) -- If True, the image of the current plot
215215
will be downloaded.
216216
format (default='png') -- Specifies the format of the image to be
217217
downloaded if `downlowad_image` is True.
@@ -328,7 +328,7 @@ def plot(figure_or_data,
328328
auto_open (default=True) -- If True, open the saved file in a
329329
web browser after saving.
330330
This argument only applies if `output_type` is 'file'.
331-
downloage_image (default=False) -- If True, the image of the current plot
331+
image (default=False) -- If True, the image of the current plot
332332
will be downloaded.
333333
format (default='png') -- Specifies the format of the image to be
334334
downloaded if `downlowad_image` is True.
@@ -477,12 +477,12 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
477477
auto_open (default=True) -- If True, open the saved file in a
478478
web browser after saving.
479479
This argument only applies if `output_type` is 'file'.
480-
downloage_image (default=False) -- If True, the image of the current plot
480+
image (default=False) -- If True, the image of the current plot
481481
will be downloaded.
482482
format (default='png') -- Specifies the format of the image to be
483483
downloaded if `downlowad_image` is True.
484-
image_filename (default='plot_image') -- Sets the name of the file your image
485-
will be saved to. The extension should not be included.
484+
image_filename (default='plot_image') -- Sets the name of the file your
485+
image will be saved to. The extension should not be included.
486486
_height (default=600) -- Specifies the height of the image in `px`.
487487
_width (default=800) -- Specifies the width of the image in `px`.
488488
@@ -499,6 +499,8 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
499499
plt.plot(x, y, "o")
500500
501501
plot_mpl(fig)
502+
# If you want to to download an image of the figure as well
503+
plot_mpl(fig, image=True)
502504
```
503505
"""
504506
plotly_plot = tools.mpl_to_plotly(mpl_fig, resize, strip_style, verbose)
@@ -562,6 +564,8 @@ def iplot_mpl(mpl_fig, resize=False, strip_style=False,
562564
563565
init_notebook_mode()
564566
iplot_mpl(fig)
567+
# and if you want to download an image of the figure as well
568+
iplot_mpl(fig, image=True)
565569
```
566570
"""
567571
plotly_plot = tools.mpl_to_plotly(mpl_fig, resize, strip_style, verbose)

0 commit comments

Comments
 (0)