Skip to content

Commit 2da9493

Browse files
Fix typo where yAxis depended on xSource
1 parent f284638 commit 2da9493

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

plotly/plotlyfig_aux/core/updateLegendMultipleAxes.m

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
obj.State.Plot(traceIndex).AssociatedAxis);
2828
[xSource, ySource] = findSourceAxis(obj, axIndex);
2929
xAxis = obj.layout.("xaxis" + xSource);
30-
yAxis = obj.layout.("yaxis" + xSource);
30+
yAxis = obj.layout.("yaxis" + ySource);
3131

3232
allDomain(traceIndex, 1) = max(xAxis.domain);
3333
allDomain(traceIndex, 2) = max(yAxis.domain);
@@ -55,22 +55,11 @@
5555
% only displays last legend as global Plotly legend
5656
obj.layout.legend = struct();
5757

58-
%---------------------------------------------------------------------%
59-
60-
%-layout showlegend-%
6158
obj.layout.showlegend = strcmpi(legendData.Visible,'on');
62-
63-
%---------------------------------------------------------------------%
64-
65-
%-legend (x,y) coordenates-%
6659
obj.layout.legend.x = 1.005 * max(allDomain(:,1));
6760
obj.layout.legend.y = 1.001 * max(allDomain(:,2));
68-
69-
%-legend (x,y) refs-%
7061
obj.layout.legend.xref = 'paper';
7162
obj.layout.legend.yref = 'paper';
72-
73-
%-legend (x,y) anchors-%
7463
obj.layout.legend.xanchor = 'left';
7564
obj.layout.legend.yanchor = 'top';
7665

0 commit comments

Comments
 (0)