@@ -60,21 +60,23 @@ function updateScatter(obj,scatterIndex)
6060% -CHECK FOR MULTIPLE AXES-%
6161[xsource , ysource ] = findSourceAxis(obj ,axIndex );
6262
63- if ~isfield(scatter_data ,' ZData' )
63+ if isfield(scatter_data ,' ZData' )
64+ if isempty(scatter_data .ZData )
6465
65- % -AXIS DATA-%
66- eval([' xaxis = obj.layout.xaxis' num2str(xsource ) ' ;' ]);
67- eval([' yaxis = obj.layout.yaxis' num2str(ysource ) ' ;' ]);
66+ % -AXIS DATA-%
67+ eval([' xaxis = obj.layout.xaxis' num2str(xsource ) ' ;' ]);
68+ eval([' yaxis = obj.layout.yaxis' num2str(ysource ) ' ;' ]);
6869
69- % -------------------------------------------------------------------------%
70+ % -------------------------------------------------------------------------%
7071
71- % -scatter xaxis-%
72- obj.data{scatterIndex }.xaxis = [' x' num2str(xsource )];
72+ % -scatter xaxis-%
73+ obj.data{scatterIndex }.xaxis = [' x' num2str(xsource )];
7374
74- % -------------------------------------------------------------------------%
75+ % -------------------------------------------------------------------------%
7576
76- % -scatter yaxis-%
77- obj.data{scatterIndex }.yaxis = [' y' num2str(ysource )];
77+ % -scatter yaxis-%
78+ obj.data{scatterIndex }.yaxis = [' y' num2str(ysource )];
79+ end
7880
7981end
8082
@@ -154,8 +156,10 @@ function updateScatter(obj,scatterIndex)
154156 showleg = false ;
155157 end
156158
157- if ~isfield(scatter_data ,' ZData' )
158- obj.data{scatterIndex }.showlegend = showleg ;
159+ if isfield(scatter_data ,' ZData' )
160+ if isempty(scatter_data .ZData )
161+ obj.data{scatterIndex }.showlegend = showleg ;
162+ end
159163 end
160164
161165 % ---------------------------------------------------------------------%
@@ -169,7 +173,11 @@ function updateScatter(obj,scatterIndex)
169173 if length(scatter_data ) > 1
170174 obj.data{scatterIndex }.marker.line.color{m } = childmarker.line.color{1 };
171175 else
172- obj.data{scatterIndex }.marker.line.color = childmarker .line .color ;
176+ if iscell(childmarker .line .color )
177+ obj.data{scatterIndex }.marker.line.color = childmarker.line.color{1 };
178+ else
179+ obj.data{scatterIndex }.marker.line.color = childmarker .line .color ;
180+ end
173181 end
174182
175183 % ---------------------------------------------------------------------%
@@ -194,12 +202,20 @@ function updateScatter(obj,scatterIndex)
194202 % ---------------------------------------------------------------------%
195203
196204 % -symbol-%
197- obj.data{scatterIndex }.marker.symbol{m } = childmarker .symbol ;
205+ if length(scatter_data ) > 1
206+ obj.data{scatterIndex }.marker.symbol{m } = childmarker .symbol ;
207+ else
208+ obj.data{scatterIndex }.marker.symbol = childmarker .symbol ;
209+ end
198210
199211 % ---------------------------------------------------------------------%
200212
201213 % -size-%
202- obj.data{scatterIndex }.marker.size = childmarker .size ;
214+ if length(scatter_data ) > 1
215+ obj.data{scatterIndex }.marker.size = childmarker .size ;
216+ else
217+ obj.data{scatterIndex }.marker.size = childmarker .size * 0.15 ;
218+ end
203219
204220 % ---------------------------------------------------------------------%
205221
@@ -208,7 +224,8 @@ function updateScatter(obj,scatterIndex)
208224 if length(scatter_data ) > 1 || ischar(childmarker .line .color )
209225 obj.data{scatterIndex }.marker.line.width(m ) = childmarker .line .width ;
210226 else
211- obj.data{scatterIndex }.marker.line.width(1 : length(childmarker .line .color )) = childmarker .line .width ;
227+ obj.data{scatterIndex }.marker.line.width = childmarker .line .width ;
228+ % obj.data{scatterIndex}.marker.line.width(1:length(childmarker.line.color)) = childmarker.line.width;
212229 end
213230
214231 % ---------------------------------------------------------------------%
0 commit comments