Merge pull request #2306 from daschw/orca
Allow saving to pdf, svg and eps for plotly() via ORCA
This commit is contained in:
commit
5051e06be0
@ -12,4 +12,13 @@ function plotlybase_syncplot(plt::Plot)
|
|||||||
return plt.o
|
return plt.o
|
||||||
end
|
end
|
||||||
|
|
||||||
_show(io::IO, ::MIME{Symbol("image/png")}, plt::Plot{PlotlyBackend}) = ORCA.PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = "png")
|
const _orca_mimeformats = Dict(
|
||||||
|
"application/pdf" => "pdf",
|
||||||
|
"image/png" => "png",
|
||||||
|
"image/svg+xml" => "svg",
|
||||||
|
"image/eps" => "eps",
|
||||||
|
)
|
||||||
|
|
||||||
|
for (mime, fmt) in _orca_mimeformats
|
||||||
|
@eval _show(io::IO, ::MIME{Symbol($mime)}, plt::Plot{PlotlyBackend}) = ORCA.PlotlyBase.savefig(io, plotlybase_syncplot(plt), format = $fmt)
|
||||||
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user