@@ -291,27 +291,6 @@ def iplot(figure_or_data, show_link=True, link_text='Export to plot.ly',
291
291
'Plotly image servers. Type help(\' py.image\' ) '
292
292
'for more details.' , UserWarning )
293
293
# Write script to download image of the plot
294
- script = ('<script>'
295
- 'function downloadimage(format, height, width,'
296
- ' filename) {{'
297
- 'var p = document.getElementById(\' {plot_id}\' );'
298
- 'Plotly.downloadImage(p, {{format: format, height: height, '
299
- 'width: width, filename: filename}});'
300
- '}};'
301
- 'if(document.readyState == \' complete\' ) {{'
302
- 'if(confirm(\' Do you want to save this image as '
303
- '{filename}.{format}?\\ n\\ n\\ n\\ n'
304
- 'For higher resolution images and more export options, '
305
- 'consider making requests to our image servers. Type: '
306
- 'help(py.image) for more details.'
307
- '\' )) {{'
308
- 'downloadimage(\' {format}\' , {height}, {width}, '
309
- '\' {filename}\' );}}'
310
- '}}'
311
- '</script>'
312
- ).format (format = image , width = image_width ,
313
- height = image_height , filename = filename ,
314
- plot_id = plotdivid )
315
294
script = image_download_script ('iplot' ).format (format = image ,
316
295
width = image_width ,
317
296
height = image_height ,
@@ -437,22 +416,6 @@ def plot(figure_or_data,
437
416
'for more details.' , UserWarning )
438
417
439
418
# write the download script:
440
- script = ('<script>'
441
- 'function downloadimage(format, height, width,'
442
- ' filename) {{'
443
- 'var p = document.getElementById(\' {plot_id}\' );'
444
- 'Plotly.downloadImage(p, {{format: format, height: '
445
- 'height, width: width, filename: filename}});'
446
- '}};'
447
- 'if(confirm(\' Do you want to save this image as '
448
- '{filename}.{format}?\' )) {{'
449
- 'downloadimage(\' {format}\' , {height}, {width}, '
450
- '\' {filename}\' );}}'
451
- '</script>'
452
- ).format (format = image , width = image_width ,
453
- height = image_height ,
454
- filename = image_filename , plot_id = plotdivid )
455
-
456
419
script = image_download_script ('plot' )
457
420
script = script .format (format = image ,
458
421
width = image_width ,
0 commit comments