Compare commits

...

3 Commits

Author SHA1 Message Date
Simon Christ
c9afb07860
fix topleft 2020-04-09 16:09:27 +02:00
Simon Christ
c7c2fc51a8 fix default 2020-04-09 00:40:12 +02:00
Simon Christ
dd41fbd0cd all the legend positions 2020-04-09 00:03:23 +02:00

View File

@ -180,9 +180,8 @@ function (pgfx_plot::PGFPlotsXPlot)(plt::Plot{PGFPlotsXBackend})
push!(axis_opt["legend style"], "at={($x, $y)}")
else
push!(
axis_opt,
"legend pos" =>
get(_pgfplotsx_legend_pos, sp[:legend], "outer north east"),
axis_opt["legend style"],
get(_pgfplotsx_legend_pos, sp[:legend], ("at" => string((1.02, 1)), "anchor" => "north west"))...
)
end
for letter in (:x, :y, :z)
@ -611,22 +610,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",
:top => ("at" => string((0.5, 0.98)), "anchor" => "north"),
:bottom => ("at" => string((0.5, 0.02)), "anchor" => "south"),
:left => ("at" => string((0.02, 0.5)), "anchor" => "west"),
:right => ("at" => string((0.98, 0.5)), "anchor" => "east"),
:bottomleft => ("at" => string((0.02, 0.02)), "anchor" => "south west"),
:bottomright => ("at" => string((0.98, 0.02)), "anchor" => "south east"),
:topright => ("at" => string((0.98, 0.98)), "anchor" => "north east"),
:topleft => ("at" => string((-0.02, 0.98)), "anchor" => "north west"),
:outertop => ("at" => string((0.5, 1.02)), "anchor" => "south"),
:outerbottom => ("at" => string((0.5, -0.02)), "anchor" => "north"),
:outerleft => ("at" => string((-0.02, 0.5)), "anchor" => "east"),
:outerright => ("at" => string((1.02, 0.5)), "anchor" => "west"),
:outerbottomleft => ("at" => string((-0.02, -0.02)), "anchor" => "north east"),
:outerbottomright => ("at" => string((1.02, -0.02)), "anchor" => "north west"),
:outertopright => ("at" => string((1.02, 1)), "anchor" => "north west"),
:outertopleft => ("at" => string((-0.02, 1)), "anchor" => "north east"),
)
const _pgfx_framestyles = [:box, :axes, :origin, :zerolines, :grid, :none]