Correct erroneous offset for legend=:outerbottom

This commit is contained in:
David Gustavsson 2021-02-25 12:20:59 +01:00
parent cd851df28a
commit 6193519b1f

View File

@ -1081,7 +1081,7 @@ function gr_legend_pos(sp::Subplot, leg, viewport_plotarea)
end
elseif occursin("bottom", str)
if s == :outerbottom
ypos = viewport_plotarea[3] - leg.yoffset - leg.h - !xmirror * gr_axis_height(sp, sp[:xaxis])
ypos = viewport_plotarea[3] - leg.yoffset - leg.dy - !xmirror * gr_axis_height(sp, sp[:xaxis])
else
ypos = viewport_plotarea[3] + leg.yoffset + leg.h
end