Skip to content

Commit a8f9aae

Browse files
committed
now handles 3d data in MATLAB version r2014b
1 parent 8cdc9d8 commit a8f9aae

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

plotly/plotlyfig_aux/handlegraphics/updateScatter.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,24 @@ function updateScatter(obj,scatterIndex)
122122

123123
%---------------------------------------------------------------------%
124124

125+
%-scatter z-%
126+
if ~verLessThan('matlab','8.4')
127+
% '8.4' is r2014b '8.3' is r2014a
128+
if isfield(scatter_data,'ZData')
129+
if any(scatter_data.ZData)
130+
if length(scatter_data) > 1
131+
obj.data{scatterIndex}.z(m) = scatter_data(n).ZData;
132+
else
133+
obj.data{scatterIndex}.z = scatter_data.ZData;
134+
end
135+
% overwrite type
136+
obj.data{scatterIndex}.type = 'scatter3d';
137+
end
138+
end
139+
end
140+
141+
%---------------------------------------------------------------------%
142+
125143
%-scatter showlegend-%
126144
leg = get(scatter_data.Annotation);
127145
legInfo = get(leg.LegendInformation);

0 commit comments

Comments
 (0)