@@ -113,6 +113,7 @@ function updateScatterhistogram(obj,scatterIndex)
113113 obj.data{p }.name = char(string(gs(t )));
114114 end
115115
116+ obj.data{p }.legendgroup = obj.data{p }.name;
116117 obj.data{p }.showlegend = true ;
117118 end
118119
@@ -174,7 +175,6 @@ function updateScatterhistogram(obj,scatterIndex)
174175
175176if ~ycateg
176177 yaxis.range = scatter_data .YLimits ;
177- % yaxis.nticks = 20;
178178else
179179 yaxis.range = [min(yplot )-0.5 , max(yplot )+0.5 ];
180180 yaxis.tickvals = 1 : max(yplot );
@@ -275,9 +275,7 @@ function updateScatterhistogram(obj,scatterIndex)
275275 % -----------------------------------------------------------------------%
276276
277277 % -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 , : ));
281279 obj.data{p }.histnorm = ' probability' ;
282280 obj.data{p }.histfunc = ' count' ;
283281
@@ -294,6 +292,8 @@ function updateScatterhistogram(obj,scatterIndex)
294292 catch
295293 obj.data{p }.name = char(string(gs(t )));
296294 end
295+
296+ obj.data{p }.legendgroup = obj.data{p }.name;
297297 end
298298
299299 % -----------------------------------------------------------------------%
@@ -355,9 +355,8 @@ function updateScatterhistogram(obj,scatterIndex)
355355obj.layout = setfield(obj .layout , sprintf(' xaxis%d ' , ps ), xaxis1 );
356356obj.layout = setfield(obj .layout , sprintf(' yaxis%d ' , ps ), yaxis1 );
357357
358- obj.layout.plot_bgcolor = ' rgba(0,0,0,0)' ;
359- obj.layout.paper_bgcolor = ' rgba(0,0,0,0)' ;
360358obj.layout.barmode = ' overlay' ;
359+ obj.layout.bargap = 0.05 ;
361360
362361
363362% =========================================================================%
@@ -390,9 +389,7 @@ function updateScatterhistogram(obj,scatterIndex)
390389 % -----------------------------------------------------------------------%
391390
392391 % -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 , : ));
396393 obj.data{p }.histnorm = ' probability' ;
397394 obj.data{p }.histfunc = ' count' ;
398395 obj.data{p }.orientation = ' h' ;
@@ -410,6 +407,8 @@ function updateScatterhistogram(obj,scatterIndex)
410407 catch
411408 obj.data{p }.name = char(string(gs(t )));
412409 end
410+
411+ obj.data{p }.legendgroup = obj.data{p }.name;
413412 end
414413
415414 % -----------------------------------------------------------------------%
0 commit comments