From 7f0c4747b4fa3e7c742a9ab396528051261f2e15 Mon Sep 17 00:00:00 2001 From: Patrick Kofod Mogensen Date: Mon, 2 May 2016 09:58:54 +0200 Subject: [PATCH] Add aspect_ratio to PGFPlots backend. --- src/backends/pgfplots.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index a9d6aba9..661fdd92 100644 --- a/src/backends/pgfplots.jl +++ b/src/backends/pgfplots.jl @@ -2,6 +2,7 @@ supportedArgs(::PGFPlotsBackend) = [ # :annotation, + :aspect_ratio, # :axis, :background_color, # :color_palette, @@ -319,11 +320,14 @@ function _pgfplots_get_axis_kwargs(d) axisargs[:ymax] = d[:ylims][2] end if d[:grid] == true - axisargs[:style] *= "grid = major" + axisargs[:style] *= "grid = major," elseif d[:grid] == false end + if d[:aspect_ratio] == :equal + axisargs[:axisEqual] = "true" + end axisargs end