Skip to content

Commit cac15c5

Browse files
committed
changed download_image parameter to image
1 parent 6abf3f9 commit cac15c5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

plotly/offline/offline.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def _plot_html(figure_or_data, show_link, link_text, validate,
187187

188188

189189
def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
190-
validate=True, download_image=False, format='png',
190+
validate=True, image=False, format='png',
191191
_width=800, _height=600, filename='plot'):
192192
"""
193193
Draw plotly graphs inside an IPython notebook without
@@ -245,7 +245,7 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
245245

246246
display(HTML(plot_html))
247247

248-
if download_image:
248+
if image:
249249
# Write script to download image of the plot
250250
script = ('<script>'
251251
'function downloadimage(format, height, width,'
@@ -272,7 +272,7 @@ def plot(figure_or_data,
272272
validate=True, output_type='file',
273273
include_plotlyjs=True,
274274
filename='temp-plot.html', auto_open=True,
275-
download_image=False, image_filename='plot', format='png',
275+
image=False, image_filename='plot', format='png',
276276
_width=800, _height=600):
277277
""" Create a plotly graph locally as an HTML document or string.
278278
@@ -365,7 +365,7 @@ def plot(figure_or_data,
365365
plotly_js_script = ''
366366

367367
# write the download script:
368-
if download_image:
368+
if image:
369369
script = ('<script>'
370370
'function downloadimage(format, height, width,'
371371
' filename) {{'
@@ -418,7 +418,7 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
418418
verbose=False, show_link=True, link_text='Export to plot.ly',
419419
validate=True, output_type='file', include_plotlyjs=True,
420420
filename='temp-plot.html', auto_open=True,
421-
download_image=False, image_filename='plot', format='png',
421+
image=False, image_filename='plot', format='png',
422422
_height=600, _width=800):
423423
"""
424424
Convert a matplotlib figure to a Plotly graph stored locally as HTML.
@@ -470,7 +470,7 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
470470
image_filename (default='plot') -- Sets the name of the file your image
471471
will be saved to. The extension should not be included.
472472
_height (default=600) -- Specifies the height of the image in `px`.
473-
_width (default=800) -- Specifies the width of the image in `px`.
473+
_width (default=800) -- Specifies the width of the image in `px`.
474474
475475
Example:
476476
```
@@ -490,14 +490,14 @@ def plot_mpl(mpl_fig, resize=False, strip_style=False,
490490
plotly_plot = tools.mpl_to_plotly(mpl_fig, resize, strip_style, verbose)
491491
return plot(plotly_plot, show_link, link_text, validate, output_type,
492492
include_plotlyjs, filename, auto_open,
493-
download_image=download_image, image_filename=image_filename,
493+
image=image, image_filename=image_filename,
494494
format=format, _height=_height, _width=_width)
495495

496496

497497
def iplot_mpl(mpl_fig, resize=False, strip_style=False,
498498
verbose=False, show_link=True,
499499
link_text='Export to plot.ly', validate=True,
500-
download_image=False, image_filename='plot', _format='png',
500+
image=False, image_filename='plot', _format='png',
501501
_height=600, _width=800):
502502
"""
503503
Convert a matplotlib figure to a plotly graph and plot inside an IPython
@@ -552,7 +552,7 @@ def iplot_mpl(mpl_fig, resize=False, strip_style=False,
552552
"""
553553
plotly_plot = tools.mpl_to_plotly(mpl_fig, resize, strip_style, verbose)
554554
return iplot(plotly_plot, show_link, link_text, validate,
555-
download_image=download_image, filename=image_filename,
555+
image=image, filename=image_filename,
556556
format=_format, _height=_height, _width=_width)
557557

558558

0 commit comments

Comments
 (0)