@@ -4,7 +4,7 @@ module PyPlot
44
55using PyCall
66import PyCall: PyObject, pygui, pycall, pyexists
7- import Base: convert, == , isequal, hash, getindex, setindex!, haskey, keys, show, mimewritable
7+ import Base: convert, == , isequal, hash, getindex, setindex!, haskey, keys, show, showable
88export Figure, plt, matplotlib, pygui, withfig
99
1010using Compat
@@ -78,14 +78,14 @@ for (mime,fmt) in aggformats
7878 f. o[" canvas" ][" print_figure" ](io, format= $ fmt, bbox_inches= " tight" )
7979 end
8080 if fmt != " svg"
81- @eval mimewritable (:: MIME{Symbol($mime)} , f:: Figure ) = ! isempty (f) && haskey (pycall (f. o[" canvas" ][" get_supported_filetypes" ], PyDict), $ fmt)
81+ @eval showable (:: MIME{Symbol($mime)} , f:: Figure ) = ! isempty (f) && haskey (pycall (f. o[" canvas" ][" get_supported_filetypes" ], PyDict), $ fmt)
8282 end
8383end
8484
8585# disable SVG output by default, since displaying large SVGs (large datasets)
8686# in IJulia is slow, and browser SVG display is buggy. (Similar to IPython.)
8787const SVG = [false ]
88- mimewritable (:: MIME"image/svg+xml" , f:: Figure ) = SVG[1 ] && ! isempty (f) && haskey (pycall (f. o[" canvas" ][" get_supported_filetypes" ], PyDict), " svg" )
88+ showable (:: MIME"image/svg+xml" , f:: Figure ) = SVG[1 ] && ! isempty (f) && haskey (pycall (f. o[" canvas" ][" get_supported_filetypes" ], PyDict), " svg" )
8989svg () = SVG[1 ]
9090svg (b:: Bool ) = (SVG[1 ] = b)
9191
0 commit comments