From 5196ce52635bce5765948e2e9751e1ae5ac63761 Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Wed, 11 May 2016 22:13:45 +0200 Subject: [PATCH] Add PGFPlots support for the size kw. --- src/backends/pgfplots.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 4eab0671..48c41d6f 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -34,7 +34,7 @@ supportedArgs(::PGFPlotsBackend) = [ # :pos, # :smooth, # :show, - # :size, + :size, :title, # :windowtitle, :x, @@ -366,7 +366,8 @@ function _make_pgf_plot(plt::Plot{PGFPlotsBackend}) push!(os, _pgfplots_axis(plt_series)) end axisargs =_pgfplots_get_axis_kwargs(plt.plotargs) - plt.o = PGFPlots.Axis([os...]; axisargs...) + w, h = map(px2mm, plt.plotargs[:size]) + plt.o = PGFPlots.Axis([os...]; width = "$w mm", height = "$h mm", axisargs...) end function Base.writemime(io::IO, mime::MIME"image/svg+xml", plt::AbstractPlot{PGFPlotsBackend})