From 42f9791d758c70d4ee2dda2de13b616377f8d95d Mon Sep 17 00:00:00 2001 From: Simon Christ Date: Thu, 19 Mar 2020 11:24:22 +0100 Subject: [PATCH] add legend positions --- src/backends/pgfplotsx.jl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/backends/pgfplotsx.jl b/src/backends/pgfplotsx.jl index 6a205f45..7170230d 100644 --- a/src/backends/pgfplotsx.jl +++ b/src/backends/pgfplotsx.jl @@ -104,7 +104,7 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend}) end for sp in plt.subplots - bb = sp.plotarea + bb = bbox(sp) sp_width = width(bb) sp_height = height(bb) dx, dy = bb.x0 @@ -604,11 +604,22 @@ const _pgfplotsx_markers = KW( ) const _pgfplotsx_legend_pos = KW( + :top => "north", + :bottom => "south", + :left => "west", + :right => "east" :bottomleft => "south west", :bottomright => "south east", :topright => "north east", :topleft => "north west", + :outertop => "north", + :outerbottom => "outer south", + :outerleft => "outer west", + :outerright => "outer east" + :outerbottomleft => "outer south west", + :outerbottomright => "outer south east", :outertopright => "outer north east", + :outertopleft => "outer north west", ) const _pgfx_framestyles = [:box, :axes, :origin, :zerolines, :grid, :none]