From 5c127f945ff2b69ac5beeb6065d6c30795253587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Nilsen=20Riseth?= Date: Thu, 18 Aug 2016 15:48:47 +0100 Subject: [PATCH] Add eps to savefig --- src/output.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/output.jl b/src/output.jl index 022b92f6..8474223d 100644 --- a/src/output.jl +++ b/src/output.jl @@ -36,6 +36,13 @@ function ps(plt::Plot, fn::AbstractString) end ps(fn::AbstractString) = ps(current(), fn) +function eps(plt::Plot, fn::AbstractString) + fn = addExtension(fn, "eps") + io = open(fn, "w") + writemime(io, MIME("image/eps"), plt) + close(io) +end +eps(fn::AbstractString) = eps(current(), fn) function tex(plt::Plot, fn::AbstractString) fn = addExtension(fn, "tex") @@ -54,6 +61,7 @@ const _savemap = Dict( "svg" => svg, "pdf" => pdf, "ps" => ps, + "eps" => eps, "tex" => tex, )