From 27e68ed6a97a02f59c74309e9a7a9b2f4099705b Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Mon, 21 May 2018 14:49:18 +0200 Subject: [PATCH] only try the pdf -> png convert if the backend support application/pdf mime --- src/output.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output.jl b/src/output.jl index 3932d94b..ca1461c8 100644 --- a/src/output.jl +++ b/src/output.jl @@ -218,9 +218,10 @@ closeall() = closeall(backend()) # --------------------------------------------------------- # 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") @eval import FileIO - function _show(io::IO, ::MIME"image/png", plt::Plot) + function _show(io::IO, ::MIME"image/png", plt::Plot{<:PDFBackends}) fn = tempname() # first save a pdf file