Merge pull request #1537 from fredrikekre/fe/fileio
only try the pdf -> png convert sometimes
This commit is contained in:
commit
afe4817150
@ -221,9 +221,10 @@ closeall() = closeall(backend())
|
|||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
# A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert
|
# A backup, if no PNG generation is defined, is to try to make a PDF and use FileIO to convert
|
||||||
|
|
||||||
|
const PDFBackends = Union{PGFPlotsBackend,PlotlyJSBackend,PyPlotBackend,InspectDRBackend,GRBackend}
|
||||||
if is_installed("FileIO")
|
if is_installed("FileIO")
|
||||||
@eval import FileIO
|
@eval import FileIO
|
||||||
function _show(io::IO, ::MIME"image/png", plt::Plot)
|
function _show(io::IO, ::MIME"image/png", plt::Plot{<:PDFBackends})
|
||||||
fn = tempname()
|
fn = tempname()
|
||||||
|
|
||||||
# first save a pdf file
|
# first save a pdf file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user