Add PGFPlots support for the size kw.

This commit is contained in:
Patrick Kofod Mogensen 2016-05-11 22:13:45 +02:00
parent 9231da4610
commit 5196ce5263

View File

@ -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})