@@ -509,11 +509,11 @@ def enable_mpl_offline(resize=False, strip_style=False,
509509 lambda fig : iplot_mpl (fig , resize , strip_style , verbose ,
510510 show_link , link_text , validate ))
511511
512- def downloadImage (format = 'png' , height = 600 , width = 800 ,
512+ def download_notebook_image (format = 'png' , height = 600 , width = 800 ,
513513 filename = 'newplot' ):
514514
515515 script = ('<script>'
516- 'function downloadimage(format, width, height ,'
516+ 'function downloadimage(format, height, width ,'
517517 ' filename) {{'
518518 'var elementsList = document.querySelectorAll(\' .code_cell\' );'
519519 'var selected = null;'
@@ -534,11 +534,10 @@ def downloadImage(format='png', height=600, width=800,
534534 'var pre_div = new_list.slice(-1)[0];'
535535 'var p = document.getElementById(pre_div.parentElement.id);'
536536 'Plotly.downloadImage(p, {{format: format, height: height, '
537- 'width: width, filename: ` filename}});'
537+ 'width: width, filename: filename}});'
538538 '}}'
539539 '}}'
540540 'downloadimage(\' {format}\' , {height}, {width}, \' {filename}\' );'
541- 'alert(\' ran\' );'
542541 '</script>'
543542 ).format (format = format , height = height , width = width ,
544543 filename = filename )
0 commit comments