@@ -60,21 +60,23 @@ function updateScatter(obj,scatterIndex)
60
60
% -CHECK FOR MULTIPLE AXES-%
61
61
[xsource , ysource ] = findSourceAxis(obj ,axIndex );
62
62
63
- if ~isfield(scatter_data ,' ZData' )
63
+ if isfield(scatter_data ,' ZData' )
64
+ if isempty(scatter_data .ZData )
64
65
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 ) ' ;' ]);
68
69
69
- % -------------------------------------------------------------------------%
70
+ % -------------------------------------------------------------------------%
70
71
71
- % -scatter xaxis-%
72
- obj.data{scatterIndex }.xaxis = [' x' num2str(xsource )];
72
+ % -scatter xaxis-%
73
+ obj.data{scatterIndex }.xaxis = [' x' num2str(xsource )];
73
74
74
- % -------------------------------------------------------------------------%
75
+ % -------------------------------------------------------------------------%
75
76
76
- % -scatter yaxis-%
77
- obj.data{scatterIndex }.yaxis = [' y' num2str(ysource )];
77
+ % -scatter yaxis-%
78
+ obj.data{scatterIndex }.yaxis = [' y' num2str(ysource )];
79
+ end
78
80
79
81
end
80
82
@@ -154,8 +156,10 @@ function updateScatter(obj,scatterIndex)
154
156
showleg = false ;
155
157
end
156
158
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
159
163
end
160
164
161
165
% ---------------------------------------------------------------------%
@@ -169,7 +173,11 @@ function updateScatter(obj,scatterIndex)
169
173
if length(scatter_data ) > 1
170
174
obj.data{scatterIndex }.marker.line.color{m } = childmarker.line.color{1 };
171
175
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
173
181
end
174
182
175
183
% ---------------------------------------------------------------------%
@@ -194,12 +202,20 @@ function updateScatter(obj,scatterIndex)
194
202
% ---------------------------------------------------------------------%
195
203
196
204
% -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
198
210
199
211
% ---------------------------------------------------------------------%
200
212
201
213
% -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
203
219
204
220
% ---------------------------------------------------------------------%
205
221
@@ -208,7 +224,8 @@ function updateScatter(obj,scatterIndex)
208
224
if length(scatter_data ) > 1 || ischar(childmarker .line .color )
209
225
obj.data{scatterIndex }.marker.line.width(m ) = childmarker .line .width ;
210
226
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;
212
229
end
213
230
214
231
% ---------------------------------------------------------------------%
0 commit comments