From 167fd687748f2a763da378c3b51b51ce89e8fbf6 Mon Sep 17 00:00:00 2001 From: Pietro Vertechi Date: Mon, 28 Nov 2016 04:15:09 +0000 Subject: [PATCH] Added savefig html --- src/output.jl | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/output.jl b/src/output.jl index d2b7da7c..9e2bd7cb 100644 --- a/src/output.jl +++ b/src/output.jl @@ -52,6 +52,14 @@ function tex(plt::Plot, fn::AbstractString) end tex(fn::AbstractString) = tex(current(), fn) +function html(plt::Plot, fn::AbstractString) + fn = addExtension(fn, "html") + io = open(fn, "w") + show(io, MIME("text/html"), plt) + close(io) +end +html(fn::AbstractString) = html(current(), fn) + # ---------------------------------------------------------------- @@ -63,6 +71,7 @@ const _savemap = Dict( "ps" => ps, "eps" => eps, "tex" => tex, + "html" => html, ) function getExtension(fn::AbstractString)