Legend positioning for 3d plots in plotly (#3840)
* Remove hardoced numbers, shift for 3d plots * Revert changes * Fixed some missed reverts
This commit is contained in:
parent
7bfc97285c
commit
8d95333d1e
@ -362,6 +362,7 @@ end
|
|||||||
|
|
||||||
function plotly_legend_pos(pos::Symbol)
|
function plotly_legend_pos(pos::Symbol)
|
||||||
xleft = 0.07
|
xleft = 0.07
|
||||||
|
xright = 1.0
|
||||||
ybot = 0.07
|
ybot = 0.07
|
||||||
ytop = 1.0
|
ytop = 1.0
|
||||||
xcenter = 0.55
|
xcenter = 0.55
|
||||||
@ -372,14 +373,14 @@ function plotly_legend_pos(pos::Symbol)
|
|||||||
xouterright = 1.05
|
xouterright = 1.05
|
||||||
xouterleft = -0.15
|
xouterleft = -0.15
|
||||||
plotly_legend_position_mapping = (
|
plotly_legend_position_mapping = (
|
||||||
right = (coords = [1.0, ycenter], xanchor = "right", yanchor = "middle"),
|
right = (coords = [xright, ycenter], xanchor = "right", yanchor = "middle"),
|
||||||
left = (coords = [xleft, ycenter], xanchor = "left", yanchor = "middle"),
|
left = (coords = [xleft, ycenter], xanchor = "left", yanchor = "middle"),
|
||||||
top = (coords = [xcenter, ytop], xanchor = "center", yanchor = "top"),
|
top = (coords = [xcenter, ytop], xanchor = "center", yanchor = "top"),
|
||||||
bottom = (coords = [xcenter, ybot], xanchor = "center", yanchor = "bottom"),
|
bottom = (coords = [xcenter, ybot], xanchor = "center", yanchor = "bottom"),
|
||||||
bottomleft = (coords = [xleft, ybot], xanchor = "left", yanchor = "bottom"),
|
bottomleft = (coords = [xleft, ybot], xanchor = "left", yanchor = "bottom"),
|
||||||
bottomright = (coords = [1.0, ybot], xanchor = "right", yanchor = "bottom"),
|
bottomright = (coords = [xright, ybot], xanchor = "right", yanchor = "bottom"),
|
||||||
topright = (coords = [1.0, 1.0], xanchor = "right", yanchor = "top"),
|
topright = (coords = [xright, ytop], xanchor = "right", yanchor = "top"),
|
||||||
topleft = (coords = [xleft, 1.0], xanchor = "left", yanchor = "top"),
|
topleft = (coords = [xleft, ytop], xanchor = "left", yanchor = "top"),
|
||||||
outertop = (coords = [center, youtertop], xanchor = "upper", yanchor = "middle"),
|
outertop = (coords = [center, youtertop], xanchor = "upper", yanchor = "middle"),
|
||||||
outerbottom = (coords = [center, youterbot], xanchor = "lower", yanchor = "middle"),
|
outerbottom = (coords = [center, youterbot], xanchor = "lower", yanchor = "middle"),
|
||||||
outerleft = (coords = [xouterleft, center], xanchor = "left", yanchor = "top"),
|
outerleft = (coords = [xouterleft, center], xanchor = "left", yanchor = "top"),
|
||||||
@ -400,7 +401,7 @@ function plotly_legend_pos(pos::Symbol)
|
|||||||
xanchor = "lower",
|
xanchor = "lower",
|
||||||
yanchor = "right",
|
yanchor = "right",
|
||||||
),
|
),
|
||||||
default = (coords = [1.0, 1.0], xanchor = "auto", yanchor = "auto"),
|
default = (coords = [xright, ytop], xanchor = "auto", yanchor = "auto"),
|
||||||
)
|
)
|
||||||
|
|
||||||
legend_position =
|
legend_position =
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user