Skip to content

Commit d44d465

Browse files
committed
Merge pull request #67 from jnj16180340/bug_scatter3-creates-a-2d-plot
updateScatter now handles 3d data in MATLAB version r2014b
2 parents 8cdc9d8 + d6e810b commit d44d465

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## MATLAB PLOTLY API WRAPPER 2.2.1
1+
## MATLAB PLOTLY API WRAPPER 2.2.2
22

33
### NUTSHELL:
44

plotly/plotly_aux/plotly_version.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
function version = plotly_version()
2-
version = '2.2.1';
2+
version = '2.2.2';
33
end

plotly/plotlyfig_aux/handlegraphics/updateScatter.m

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

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

125+
%-scatter z-%
126+
if isHG2()
127+
if isfield(scatter_data,'ZData')
128+
if any(scatter_data.ZData)
129+
if length(scatter_data) > 1
130+
obj.data{scatterIndex}.z(m) = scatter_data(n).ZData;
131+
else
132+
obj.data{scatterIndex}.z = scatter_data.ZData;
133+
end
134+
% overwrite type
135+
obj.data{scatterIndex}.type = 'scatter3d';
136+
end
137+
end
138+
end
139+
140+
%---------------------------------------------------------------------%
141+
125142
%-scatter showlegend-%
126143
leg = get(scatter_data.Annotation);
127144
legInfo = get(leg.LegendInformation);

0 commit comments

Comments
 (0)