* Account for adding dy to ymax in legend pos * Subtract x legend offset from :right symbols
This commit is contained in:
parent
1ee999af33
commit
7e122bdfea
@ -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
|
# 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])
|
xpos = viewport_plotarea[2] + x_legend_offset + legend_leftw + ymirror * gr_axis_width(sp, sp[:yaxis])
|
||||||
else
|
else
|
||||||
xpos = viewport_plotarea[2] - legend_rightw - legend_textw
|
xpos = viewport_plotarea[2] - legend_rightw - legend_textw - x_legend_offset
|
||||||
end
|
end
|
||||||
elseif occursin("left", str)
|
elseif occursin("left", str)
|
||||||
if occursin("outer", str)
|
if occursin("outer", str)
|
||||||
@ -600,7 +600,7 @@ function gr_legend_pos(sp::Subplot, w, h, viewport_plotarea)
|
|||||||
if s == :outertop
|
if s == :outertop
|
||||||
ypos = viewport_plotarea[4] + y_legend_offset + legendh + xmirror * gr_axis_height(sp, sp[:xaxis])
|
ypos = viewport_plotarea[4] + y_legend_offset + legendh + xmirror * gr_axis_height(sp, sp[:xaxis])
|
||||||
else
|
else
|
||||||
ypos = viewport_plotarea[4] - y_legend_offset
|
ypos = viewport_plotarea[4] - y_legend_offset - legend_dy
|
||||||
end
|
end
|
||||||
elseif occursin("bottom", str)
|
elseif occursin("bottom", str)
|
||||||
if s == :outerbottom
|
if s == :outerbottom
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user