We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19c7756 commit 56a05e7Copy full SHA for 56a05e7
plotly/plotlyfig_aux/handlegraphics/updateArea.m
@@ -66,8 +66,17 @@ function updateArea(obj,areaIndex)
66
%-AXIS INDEX-%
67
axIndex = obj.getAxisIndex(obj.State.Plot(areaIndex).AssociatedAxis);
68
69
- %-CHECK FOR MULTIPLE AXES-%
70
- [xsource, ysource] = findSourceAxis(obj,axIndex);
+ %-check for multiple axes-%
+ try
71
+ for yax = 1:2
72
+ yAxisColor = area_data.Parent.YAxis(yax).Color;
73
+ yaxIndex(yax) = sum(yAxisColor == area_data.FaceColor);
74
+ end
75
+ [~, yaxIndex] = max(yaxIndex);
76
+ [xsource, ysource] = findSourceAxis(obj, axIndex, yaxIndex);
77
+ catch
78
+ [xsource, ysource] = findSourceAxis(obj,axIndex);
79
80
81
%---------------------------------------------------------------------%
82
0 commit comments