Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f374bec

Browse files
authored
Merge pull request #17027 from QuLogic/nbagg-blit
FIX: saving nbAgg figure after a partial blit
2 parents 45e1ca9 + 7f8e54a commit f374bec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/web_backend/js/nbagg_mpl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ mpl.mpl_figure_comm = function (comm, msg) {
3333
var ws_proxy = comm_websocket_adapter(comm);
3434

3535
function ondownload(figure, _format) {
36-
window.open(figure.imageObj.src);
36+
window.open(figure.canvas.toDataURL());
3737
}
3838

3939
var fig = new mpl.figure(id, ws_proxy, ondownload, element.get(0));

0 commit comments

Comments
 (0)