According to the docs, most of the graphical backends support SVG output, but it looks like a lot of them don't support SVGZ (which is simply gzip-compressed SVG).
Matplotlib supports SVGZ and it seems like it would be quite easy to implement similar support for any backend that supports SVG, simply by piping the SVG output through a GZipStream from GZip.jl.
For example, it seems like this works already:
using Plots, GZip
p = plot(...)
gzopen(io -> show(io, "image/svg+xml", p), "bar.svgz", "w") # save as bar.svgz
For a typical plot line plot, e.g. plot(rand(100)) or plot(rand(10^4)), I get compression ratios around 50%.
This stackoverflow discussion claims that the need for SVGZ is greatly reduced by modern web servers that can compress on the fly, but the responses in the thread dispute this.
According to the docs, most of the graphical backends support SVG output, but it looks like a lot of them don't support SVGZ (which is simply gzip-compressed SVG).
Matplotlib supports SVGZ and it seems like it would be quite easy to implement similar support for any backend that supports SVG, simply by piping the SVG output through a
GZipStream
from GZip.jl.For example, it seems like this works already:
For a typical plot line plot, e.g.
plot(rand(100))
orplot(rand(10^4))
, I get compression ratios around 50%.