@@ -113,6 +113,7 @@ function updateScatterhistogram(obj,scatterIndex)
113
113
obj.data{p }.name = char(string(gs(t )));
114
114
end
115
115
116
+ obj.data{p }.legendgroup = obj.data{p }.name;
116
117
obj.data{p }.showlegend = true ;
117
118
end
118
119
@@ -174,7 +175,6 @@ function updateScatterhistogram(obj,scatterIndex)
174
175
175
176
if ~ycateg
176
177
yaxis.range = scatter_data .YLimits ;
177
- % yaxis.nticks = 20;
178
178
else
179
179
yaxis.range = [min(yplot )-0.5 , max(yplot )+0.5 ];
180
180
yaxis.tickvals = 1 : max(yplot );
@@ -275,9 +275,7 @@ function updateScatterhistogram(obj,scatterIndex)
275
275
% -----------------------------------------------------------------------%
276
276
277
277
% -plot setting-%
278
- obj.data{p }.marker.color = ' rgba(0,0,0,0)' ;
279
- obj.data{p }.marker.line.color = sprintf(' rgb(%f ,%f ,%f )' , scatter_data .Color(t , : ));
280
- obj.data{p }.marker.line.width = scatter_data .LineWidth(t );
278
+ obj.data{p }.marker.color = sprintf(' rgba(%f ,%f ,%f ,0.7)' , scatter_data .Color(t , : ));
281
279
obj.data{p }.histnorm = ' probability' ;
282
280
obj.data{p }.histfunc = ' count' ;
283
281
@@ -294,6 +292,8 @@ function updateScatterhistogram(obj,scatterIndex)
294
292
catch
295
293
obj.data{p }.name = char(string(gs(t )));
296
294
end
295
+
296
+ obj.data{p }.legendgroup = obj.data{p }.name;
297
297
end
298
298
299
299
% -----------------------------------------------------------------------%
@@ -355,9 +355,8 @@ function updateScatterhistogram(obj,scatterIndex)
355
355
obj.layout = setfield(obj .layout , sprintf(' xaxis%d ' , ps ), xaxis1 );
356
356
obj.layout = setfield(obj .layout , sprintf(' yaxis%d ' , ps ), yaxis1 );
357
357
358
- obj.layout.plot_bgcolor = ' rgba(0,0,0,0)' ;
359
- obj.layout.paper_bgcolor = ' rgba(0,0,0,0)' ;
360
358
obj.layout.barmode = ' overlay' ;
359
+ obj.layout.bargap = 0.05 ;
361
360
362
361
363
362
% =========================================================================%
@@ -390,9 +389,7 @@ function updateScatterhistogram(obj,scatterIndex)
390
389
% -----------------------------------------------------------------------%
391
390
392
391
% -plot setting-%
393
- obj.data{p }.marker.color = ' rgba(0,0,0,0)' ;
394
- obj.data{p }.marker.line.color = sprintf(' rgb(%f ,%f ,%f )' , scatter_data .Color(t , : ));
395
- obj.data{p }.marker.line.width = scatter_data .LineWidth(t );
392
+ obj.data{p }.marker.color = sprintf(' rgba(%f ,%f ,%f , 0.7)' , scatter_data .Color(t , : ));
396
393
obj.data{p }.histnorm = ' probability' ;
397
394
obj.data{p }.histfunc = ' count' ;
398
395
obj.data{p }.orientation = ' h' ;
@@ -410,6 +407,8 @@ function updateScatterhistogram(obj,scatterIndex)
410
407
catch
411
408
obj.data{p }.name = char(string(gs(t )));
412
409
end
410
+
411
+ obj.data{p }.legendgroup = obj.data{p }.name;
413
412
end
414
413
415
414
% -----------------------------------------------------------------------%
0 commit comments