From 44d1cdc2b2d31466c0c9efa943638dfdd4775974 Mon Sep 17 00:00:00 2001 From: Thomas Breloff Date: Wed, 11 May 2016 09:18:40 -0400 Subject: [PATCH] pgfplots aspect_ratio --- src/backends/pgfplots.jl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplots.jl b/src/backends/pgfplots.jl index 3ba2bd36..a5591e03 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, @@ -339,11 +340,15 @@ 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 || d[:aspect_ratio] == 1 + axisargs[:axisEqual] = "true" + end + if ((d[:legend] != :none) || (d[:legend] != :best)) && (d[:legend] in keys(_pgfplots_legend_pos)) axisargs[:legendPos] = _pgfplots_legend_pos[d[:legend]] end