* Fix 2377: Legend positioning fix for multiple vertical plots * Fix #2785: Legend positioning for multiple horizontal plots
This commit is contained in:
parent
99c8bfe12d
commit
a9b9b3c357
@ -590,7 +590,7 @@ function gr_legend_pos(sp::Subplot, w, h, viewport_plotarea)
|
|||||||
xpos = viewport_plotarea[1] + 0.11
|
xpos = viewport_plotarea[1] + 0.11
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
xpos = (viewport_plotarea[2]-viewport_plotarea[1])/2 - w/2 +.04
|
xpos = (viewport_plotarea[2]-viewport_plotarea[1])/2 - w/2 +.04 + viewport_plotarea[1]
|
||||||
end
|
end
|
||||||
if occursin("top", str)
|
if occursin("top", str)
|
||||||
if s == :outertop
|
if s == :outertop
|
||||||
@ -605,7 +605,8 @@ function gr_legend_pos(sp::Subplot, w, h, viewport_plotarea)
|
|||||||
ypos = viewport_plotarea[3] + h + 0.06
|
ypos = viewport_plotarea[3] + h + 0.06
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
ypos = (viewport_plotarea[4]-viewport_plotarea[3])/2 + h/2
|
# Adding min y to shift legend pos to correct graph (#2377)
|
||||||
|
ypos = (viewport_plotarea[4]-viewport_plotarea[3])/2 + h/2 + viewport_plotarea[3]
|
||||||
end
|
end
|
||||||
(xpos,ypos)
|
(xpos,ypos)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user