Subtract x legend offset from :right symbols

This commit is contained in:
Diaga 2020-07-22 17:46:56 +05:00
parent be9c8c3bb3
commit cc1c28bf91

View File

@ -585,7 +585,7 @@ function gr_legend_pos(sp::Subplot, w, h, viewport_plotarea)
# As per https://github.com/jheinen/GR.jl/blob/master/src/jlgr.jl#L525
xpos = viewport_plotarea[2] + x_legend_offset + legend_leftw + ymirror * gr_axis_width(sp, sp[:yaxis])
else
xpos = viewport_plotarea[2] - legend_rightw - legend_textw
xpos = viewport_plotarea[2] - legend_rightw - legend_textw - x_legend_offset
end
elseif occursin("left", str)
if occursin("outer", str)