Skip to content

Commit c16484b

Browse files
bkaminsstevengj
authored andcommitted
Update mimewritable to showable (#366)
`mimewritable` is replaced by `showable` in Julia 1.0
1 parent 4ac1e65 commit c16484b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PyPlot.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module PyPlot
44

55
using PyCall
66
import 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
88
export Figure, plt, matplotlib, pygui, withfig
99

1010
using 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
8383
end
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.)
8787
const 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")
8989
svg() = SVG[1]
9090
svg(b::Bool) = (SVG[1] = b)
9191

0 commit comments

Comments
 (0)