From a3985bfa88cf6c1fd8a25db086dbfd47ee8b012b Mon Sep 17 00:00:00 2001 From: Purwar Date: Sat, 18 Sep 2021 14:53:36 -1000 Subject: [PATCH 1/7] dirty --- plotly/plotlyfig_aux/core/updateData.m | 2 + .../handlegraphics/updateBubblecloud.m | 234 ++++++++++++++++++ 2 files changed, 236 insertions(+) create mode 100644 plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m diff --git a/plotly/plotlyfig_aux/core/updateData.m b/plotly/plotlyfig_aux/core/updateData.m index e790c4cc..7ae6d9aa 100644 --- a/plotly/plotlyfig_aux/core/updateData.m +++ b/plotly/plotlyfig_aux/core/updateData.m @@ -48,6 +48,8 @@ switch lower(obj.State.Plot(dataIndex).Class) %--CORE PLOT OBJECTS--% + case 'bubblecloud' + updateBubblecloud(obj,dataIndex); case 'scatterhistogram' updateScatterhistogram(obj, dataIndex); case 'wordcloud' diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m new file mode 100644 index 00000000..5f7b0c66 --- /dev/null +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -0,0 +1,234 @@ +function updateBubblecloud(obj,bcIndex) + +%-AXIS INDEX-% +axIndex = obj.getAxisIndex(obj.State.Plot(bcIndex).AssociatedAxis); + +%-BubbleCloud (bc) DATA STRUCTURE- % +bcData = get(obj.State.Plot(bcIndex).Handle); + +%-CHECK FOR MULTIPLE AXES-% +[xsource, ysource] = findSourceAxis(obj,axIndex); + +% %-AXIS DATA-% +% eval(['xaxis = obj.layout.xaxis' num2str(xsource) ';']); +% eval(['yaxis = obj.layout.yaxis' num2str(ysource) ';']); + +obj.layout.xaxis.side = 'bottom'; +obj.layout.xaxis.zeroline = 0; +obj.layout.xaxis.autorange = 0; +obj.layout.xaxis.linecolor='rgb(38.25,38.25,38.25)'; +obj.layout.xaxis.showgrid = 0; +obj.layout.xaxis.linewidth = 1; +obj.layout.xaxis.type = 'linear'; +obj.layout.xaxis.showline = 0; +obj.layout.xaxis.anchor = 'y1'; + +obj.layout.yaxis.side = 'left'; +obj.layout.yaxis.zeroline = 0; +obj.layout.yaxis.autorange = 0; +obj.layout.yaxis.linecolor='rgb(38.25,38.25,38.25)'; +obj.layout.yaxis.showgrid = 0; +obj.layout.yaxis.linewidth = 1; +obj.layout.yaxis.type = 'linear'; +obj.layout.yaxis.showline = 0; +obj.layout.yaxis.anchor = 'x1'; +obj.layout.title=''; +obj.layout.margin.t=80; + +%-------------------------------------------------------------------------% + +%-bc xaxis-% +obj.data{bcIndex}.xaxis = ['x' num2str(xsource)]; + +%-------------------------------------------------------------------------% + +%-bc yaxis-% +obj.data{bcIndex}.yaxis = ['y' num2str(ysource)]; + +%-------------------------------------------------------------------------% + +%-bc type-% +obj.data{bcIndex}.type = 'scatter'; + +%-------------------------------------------------------------------------% + +%-bc mode-% +obj.data{bcIndex}.mode = 'markers+text'; + +%-------------------------------------------------------------------------% + +%-bc visible-% +obj.data{bcIndex}.visible = strcmp(bcData.Visible,'on'); + +%-------------------------------------------------------------------------% + +%-bc name-% +obj.data{bcIndex}.name = bcData.LegendTitle; + +%-------------------------------------------------------------------------% + +[sortedradii,sortind]=sort(sqrt(real(bcData.SizeData)),'descend'); +validind=isfinite(sortedradii) & sortedradii>0; +sortind=sortind(validind); +sortedradii=sortedradii(validind); + +if bcData.MaxDisplayBubbles < numel(sortind) + sortind=sortind(1:bcData.MaxDisplayBubbles); + sortedradii=sortedradii(1:bcData.MaxDisplayBubbles); +end +RadiusIndex=sortind; + +% Normalize radii so that the largest bubble has a radius of 1 +if ~isempty(sortedradii) + sortedradii=sortedradii/max(sortedradii); +end + +ar = 840/630; +xy = matlab.graphics.internal.layoutBubbleCloud(sortedradii,ar); +fac=2*ar; +rads = 2*sortedradii * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); +xy = matlab.graphics.internal.layoutBubbleCloud(rads,ar); + +obj.layout.xaxis.range=[fac*min(xy(1,:)), fac*max(xy(1,:))]; +obj.layout.yaxis.range=[(fac/ar)*min(xy(2,:)), (fac/ar)*max(xy(2,:))]; + +rads = 2*rads * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); + +%-------------------------------------------------------------------------% + +labels = bcData.LabelData(RadiusIndex); +obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); + +%-------------------------------------------------------------------------% + +% obj.data{bcIndex}.hoverinfo = ''; +obj.data{bcIndex}.hovertemplate = 'Size: %{hovertext}
Label: %{text}'; +obj.data{bcIndex}.hovertext = arrayfun(@(x) {num2str(x)}, bcData.SizeData(RadiusIndex)); + +%-------------------------------------------------------------------------% + +%-bc x-% +% if length(bcData) > 1 +% obj.data{bcIndex}.x(m) = bcData(n).XData; +% else + obj.data{bcIndex}.x = xy(1,:); +% end + +%---------------------------------------------------------------------% + +%-bc y-% +% if length(bcData) > 1 +% obj.data{bcIndex}.y(m) = bcData(n).YData; +% else + obj.data{bcIndex}.y = xy(2,:); +% end + +%---------------------------------------------------------------------% + +%-bc z-% +% if isHG2() +% if isfield(bcData,'ZData') +% if any(bcData.ZData) +% if length(bcData) > 1 +% obj.data{bcIndex}.z(m) = bcData(n).ZData; +% else +% obj.data{bcIndex}.z = bcData.ZData; +% end +% % overwrite type +% obj.data{bcIndex}.type = 'scatter3d'; +% end +% end +% end + +%---------------------------------------------------------------------% + +%-bc showlegend-% +try + leg = get(bcData.Annotation); +catch + leg=[]; +end +if ~isempty(leg) + legInfo = get(leg.LegendInformation); + + switch legInfo.IconDisplayStyle + case 'on' + showleg = true; + case 'off' + showleg = false; + end +end + +if isfield(bcData,'ZData') + if isempty(bcData.ZData) + obj.data{bcIndex}.showlegend = showleg; + end +end + +%---------------------------------------------------------------------% + +%-bc marker-% +childmarker = extractScatterMarker(bcData); + +%---------------------------------------------------------------------% + +%-line color-% +if length(bcData) > 1 + obj.data{bcIndex}.marker.line.color{m} = childmarker.line.color{1}; +else + if length(childmarker.line.color) > 3 + obj.data{bcIndex}.marker.line.color = childmarker.line.color; + else + obj.data{bcIndex}.marker.line.color = childmarker.line.color{1}; + end +end + +%---------------------------------------------------------------------% + +%-marker color-% +if length(bcData) > 1 + obj.data{bcIndex}.marker.color{m} = childmarker.color{1}; +else + obj.data{bcIndex}.marker.color = childmarker.color; +end + +%---------------------------------------------------------------------% + +%-sizeref-% +obj.data{bcIndex}.marker.sizeref = 1; %2*max(bcData.SizeData)/(33^2); + +%---------------------------------------------------------------------% + +%-sizemode-% +obj.data{bcIndex}.marker.sizemode = 'diameter'; + +%---------------------------------------------------------------------% + +%-symbol-% +obj.data{bcIndex}.marker.symbol = childmarker.symbol; + +%---------------------------------------------------------------------% + +%-size-% +% if length(bcData) > 1 + obj.data{bcIndex}.marker.size = rads; %sort(bcData.sizeData,'descend'); + +%max(bcData.SizeData)*sortedradii; + + +% else +% obj.data{bcIndex}.marker.size = childmarker.size * 0.15; +% end + +%---------------------------------------------------------------------% + +%-line width-% + +obj.data{bcIndex}.marker.line.width = 1.5; +% obj.data{bcIndex}.marker.line.width(1:length(childmarker.line.color)) = childmarker.line.width; + + +%---------------------------------------------------------------------% + +end + From ffbc5ffbd8f79b91613042a8f7960b7ab0df1f96 Mon Sep 17 00:00:00 2001 From: Purwar Date: Sat, 18 Sep 2021 18:52:19 -1000 Subject: [PATCH 2/7] Little better, but not fixed yet --- .../handlegraphics/updateBubblecloud.m | 91 ++++------ .../plotlyfig_aux/helpers/extractAxisData.m | 169 +++++++++++------- 2 files changed, 140 insertions(+), 120 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 5f7b0c66..44b30c9a 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -13,27 +13,32 @@ function updateBubblecloud(obj,bcIndex) % eval(['xaxis = obj.layout.xaxis' num2str(xsource) ';']); % eval(['yaxis = obj.layout.yaxis' num2str(ysource) ';']); -obj.layout.xaxis.side = 'bottom'; -obj.layout.xaxis.zeroline = 0; -obj.layout.xaxis.autorange = 0; -obj.layout.xaxis.linecolor='rgb(38.25,38.25,38.25)'; -obj.layout.xaxis.showgrid = 0; -obj.layout.xaxis.linewidth = 1; -obj.layout.xaxis.type = 'linear'; -obj.layout.xaxis.showline = 0; -obj.layout.xaxis.anchor = 'y1'; - -obj.layout.yaxis.side = 'left'; -obj.layout.yaxis.zeroline = 0; -obj.layout.yaxis.autorange = 0; -obj.layout.yaxis.linecolor='rgb(38.25,38.25,38.25)'; -obj.layout.yaxis.showgrid = 0; -obj.layout.yaxis.linewidth = 1; -obj.layout.yaxis.type = 'linear'; -obj.layout.yaxis.showline = 0; -obj.layout.yaxis.anchor = 'x1'; -obj.layout.title=''; +% obj.layout.xaxis.side = 'bottom'; +obj.layout.xaxis1.showline = false; +obj.layout.xaxis1.zeroline = false; +% obj.layout.xaxis.autorange = false; +% % obj.layout.xaxis.linecolor='rgb(0,0,0)'; +% obj.layout.xaxis.showgrid = true; +% obj.layout.xaxis.linewidth = 1; +% obj.layout.xaxis.type = 'linear'; +% obj.layout.xaxis.anchor = 'y1'; +obj.layout.xaxis1.mirror = true; +% +% +% obj.layout.yaxis.side = 'left'; +obj.layout.yaxis1.showline = false; +obj.layout.yaxis1.zeroline = false; +% obj.layout.yaxis.autorange = false; +% % obj.layout.yaxis.linecolor='rgb(0,0,0)'; +% obj.layout.yaxis.showgrid = true; +% obj.layout.yaxis.linewidth = 1; +% obj.layout.yaxis.type = 'linear'; +% obj.layout.yaxis.anchor = 'x1'; +obj.layout.yaxis1.mirror = true; + +obj.layout.title.text=''; obj.layout.margin.t=80; +obj.layout.annotations{1}.text=''; %-------------------------------------------------------------------------% @@ -87,18 +92,20 @@ function updateBubblecloud(obj,bcIndex) xy = matlab.graphics.internal.layoutBubbleCloud(sortedradii,ar); fac=2*ar; rads = 2*sortedradii * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); -xy = matlab.graphics.internal.layoutBubbleCloud(rads,ar); +% xy = matlab.graphics.internal.layoutBubbleCloud(rads,ar); -obj.layout.xaxis.range=[fac*min(xy(1,:)), fac*max(xy(1,:))]; -obj.layout.yaxis.range=[(fac/ar)*min(xy(2,:)), (fac/ar)*max(xy(2,:))]; +obj.layout.xaxis1.range=[fac*min(xy(1,:)), fac*max(xy(1,:))]; +obj.layout.yaxis1.range=[(fac/ar)*min(xy(2,:)), (fac/ar)*max(xy(2,:))]; -rads = 2*rads * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); +% rads = 2*rads * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); %-------------------------------------------------------------------------% labels = bcData.LabelData(RadiusIndex); obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); +obj.data{bcIndex}.textfont = matlab2plotlyfont(bcData.FontName); + %-------------------------------------------------------------------------% % obj.data{bcIndex}.hoverinfo = ''; @@ -167,35 +174,24 @@ function updateBubblecloud(obj,bcIndex) %---------------------------------------------------------------------% -%-bc marker-% -childmarker = extractScatterMarker(bcData); - -%---------------------------------------------------------------------% - %-line color-% if length(bcData) > 1 obj.data{bcIndex}.marker.line.color{m} = childmarker.line.color{1}; else - if length(childmarker.line.color) > 3 - obj.data{bcIndex}.marker.line.color = childmarker.line.color; - else - obj.data{bcIndex}.marker.line.color = childmarker.line.color{1}; - end + col=uint8(bcData.EdgeColor*255); + obj.data{bcIndex}.marker.line.color = sprintf('rgb(%i,%i,%i)',col); end %---------------------------------------------------------------------% %-marker color-% -if length(bcData) > 1 - obj.data{bcIndex}.marker.color{m} = childmarker.color{1}; -else - obj.data{bcIndex}.marker.color = childmarker.color; -end +col=uint8(bcData.ColorOrder(1,:)*255); +obj.data{bcIndex}.marker.color = sprintf('rgb(%i,%i,%i)',col); %---------------------------------------------------------------------% %-sizeref-% -obj.data{bcIndex}.marker.sizeref = 1; %2*max(bcData.SizeData)/(33^2); +obj.data{bcIndex}.marker.sizeref = 1; %---------------------------------------------------------------------% @@ -205,28 +201,17 @@ function updateBubblecloud(obj,bcIndex) %---------------------------------------------------------------------% %-symbol-% -obj.data{bcIndex}.marker.symbol = childmarker.symbol; +obj.data{bcIndex}.marker.symbol = 'circle'; %---------------------------------------------------------------------% %-size-% -% if length(bcData) > 1 - obj.data{bcIndex}.marker.size = rads; %sort(bcData.sizeData,'descend'); - -%max(bcData.SizeData)*sortedradii; - - -% else -% obj.data{bcIndex}.marker.size = childmarker.size * 0.15; -% end +obj.data{bcIndex}.marker.size = rads; %---------------------------------------------------------------------% %-line width-% - obj.data{bcIndex}.marker.line.width = 1.5; -% obj.data{bcIndex}.marker.line.width(1:length(childmarker.line.color)) = childmarker.line.width; - %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/helpers/extractAxisData.m b/plotly/plotlyfig_aux/helpers/extractAxisData.m index a87d8b61..e7774c06 100644 --- a/plotly/plotlyfig_aux/helpers/extractAxisData.m +++ b/plotly/plotlyfig_aux/helpers/extractAxisData.m @@ -7,8 +7,15 @@ %-------------------------------------------------------------------------% %-axis-side-% -axis.side = eval(['axis_data.' axisName 'AxisLocation;']); - +try + axis.side = eval(['axis_data.' axisName 'AxisLocation;']); +catch + if axisName == 'X' + axis.side = 'bottom'; + elseif axisName == 'Y' + axis.side = 'left'; + end +end %-------------------------------------------------------------------------% %-axis zeroline-% @@ -36,16 +43,23 @@ %-------------------------------------------------------------------------% -ticklength = min(obj.PlotlyDefaults.MaxTickLength,... - max(axis_data.TickLength(1)*axis_data.Position(3)*obj.layout.width,... - axis_data.TickLength(1)*axis_data.Position(4)*obj.layout.height)); +try + ticklength = min(obj.PlotlyDefaults.MaxTickLength,... + max(axis_data.TickLength(1)*axis_data.Position(3)*obj.layout.width,... + axis_data.TickLength(1)*axis_data.Position(4)*obj.layout.height)); %-axis ticklen-% -axis.ticklen = ticklength; - + axis.ticklen = ticklength; +catch + axis.ticklen = 0; +end %-------------------------------------------------------------------------% -col = eval(['255*axis_data.' axisName 'Color;']); -axiscol = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')']; +try + col = eval(['255*axis_data.' axisName 'Color;']); +catch + col = [0,0,0]; +end +axiscol = sprintf('rgb(%i,%i,%i)',col); %-axis linecolor-% axis.linecolor = axiscol; @@ -57,29 +71,38 @@ axis.gridcolor = axiscol; %-------------------------------------------------------------------------% - -if strcmp(axis_data.XGrid, 'on') || strcmp(axis_data.XMinorGrid, 'on') - %-axis show grid-% - axis.showgrid = true; -else - axis.showgrid = false; +try + if strcmp(axis_data.XGrid, 'on') || strcmp(axis_data.XMinorGrid, 'on') + %-axis show grid-% + axis.showgrid = true; + else + axis.showgrid = false; + end +catch + axis.showgrid = false; end - %-------------------------------------------------------------------------% -grid = eval(['axis_data.' axisName 'Grid;']); -minorGrid = eval(['axis_data.' axisName 'MinorGrid;']); +try + grid = eval(['axis_data.' axisName 'Grid;']); + minorGrid = eval(['axis_data.' axisName 'MinorGrid;']); -if strcmp(grid, 'on') || strcmp(minorGrid, 'on') - %-axis show grid-% - axis.showgrid = true; -else + if strcmp(grid, 'on') || strcmp(minorGrid, 'on') + %-axis show grid-% + axis.showgrid = true; + else + axis.showgrid = false; + end +catch axis.showgrid = false; end %-------------------------------------------------------------------------% - -linewidth = max(1,axis_data.LineWidth*obj.PlotlyDefaults.AxisLineIncreaseFactor); +try + linewidth = max(1,axis_data.LineWidth*obj.PlotlyDefaults.AxisLineIncreaseFactor); +catch + linewidth = 0; +end %-axis line width-% axis.linewidth = linewidth; @@ -91,12 +114,21 @@ %-------------------------------------------------------------------------% %-axis type-% -axis.type = eval(['axis_data.' axisName 'Scale']); +try + axis.type = eval(['axis_data.' axisName 'Scale']); +catch + axis.type = 'linear'; +end %-------------------------------------------------------------------------% %-axis showtick labels / ticks-% -tick = eval(['axis_data.' axisName 'Tick']); +try + tick = eval(['axis_data.' axisName 'Tick']); +catch + tick=[]; +end + if isempty(tick) %-axis ticks-% @@ -107,13 +139,16 @@ axis.autorange = true; %---------------------------------------------------------------------% - - switch axis_data.Box - case 'on' - %-axis mirror-% - axis.mirror = true; - case 'off' - axis.mirror = false; + try + switch axis_data.Box + case 'on' + %-axis mirror-% + axis.mirror = true; + case 'off' + axis.mirror = false; + end + catch + axis.mirror = true; end %---------------------------------------------------------------------% @@ -295,50 +330,56 @@ end %-------------------------------------------------------------------------% - -Dir = eval(['axis_data.' axisName 'Dir;']); +try + Dir = eval(['axis_data.' axisName 'Dir;']); +catch + Dir = ''; +end if strcmp(Dir,'reverse') axis.range = [axis.range(2) axis.range(1)]; end %-------------------------------LABELS------------------------------------% +try + label = eval(['axis_data.' axisName 'Label;']); +catch + label=[]; +end +if ~isempty(label) + label_data = get(label); -label = eval(['axis_data.' axisName 'Label;']); - -label_data = get(label); - -%STANDARDIZE UNITS -fontunits = get(label,'FontUnits'); -set(label,'FontUnits','points'); + %STANDARDIZE UNITS + fontunits = get(label,'FontUnits'); + set(label,'FontUnits','points'); -%-------------------------------------------------------------------------% + %-------------------------------------------------------------------------% -%-title-% -if ~isempty(label_data.String) - axis.title = parseString(label_data.String,label_data.Interpreter); -end - -%-------------------------------------------------------------------------% + %-title-% + if ~isempty(label_data.String) + axis.title = parseString(label_data.String,label_data.Interpreter); + end -%-axis title font color-% -col = 255*label_data.Color; -axis.titlefont.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')']; + %-------------------------------------------------------------------------% -%-------------------------------------------------------------------------% + %-axis title font color-% + col = 255*label_data.Color; + axis.titlefont.color = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')']; -%-axis title font size-% -axis.titlefont.size = label_data.FontSize; + %-------------------------------------------------------------------------% -%-------------------------------------------------------------------------% + %-axis title font size-% + axis.titlefont.size = label_data.FontSize; -%-axis title font family-% -axis.titlefont.family = matlab2plotlyfont(label_data.FontName); + %-------------------------------------------------------------------------% -%-------------------------------------------------------------------------% + %-axis title font family-% + axis.titlefont.family = matlab2plotlyfont(label_data.FontName); -%REVERT UNITS -set(label,'FontUnits',fontunits); + %-------------------------------------------------------------------------% + %REVERT UNITS + set(label,'FontUnits',fontunits); +end %-------------------------------------------------------------------------% if strcmp(axis_data.Visible,'on') @@ -351,12 +392,6 @@ axis.showticklabels = false; %-axis ticks-% axis.ticks = ''; - %-axis showline-% - axis.showline = false; - %-axis showticklabels-% - axis.showticklabels = false; - %-axis ticks-% - axis.ticks = ''; end %-------------------------------------------------------------------------% From 7476cfaaf19e4abb47c22e4b0c7f8e337553cbc5 Mon Sep 17 00:00:00 2001 From: Purwar Date: Mon, 20 Sep 2021 05:52:47 -1000 Subject: [PATCH 3/7] Even better --- .../handlegraphics/updateBubblecloud.m | 91 ++++++++++--------- 1 file changed, 49 insertions(+), 42 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 44b30c9a..14fdfdfe 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -10,33 +10,30 @@ function updateBubblecloud(obj,bcIndex) [xsource, ysource] = findSourceAxis(obj,axIndex); % %-AXIS DATA-% -% eval(['xaxis = obj.layout.xaxis' num2str(xsource) ';']); -% eval(['yaxis = obj.layout.yaxis' num2str(ysource) ';']); +eval(['xaxis = obj.layout.xaxis' num2str(xsource) ';']); +eval(['yaxis = obj.layout.yaxis' num2str(ysource) ';']); -% obj.layout.xaxis.side = 'bottom'; -obj.layout.xaxis1.showline = false; +obj.layout.xaxis1.showline = true; obj.layout.xaxis1.zeroline = false; -% obj.layout.xaxis.autorange = false; -% % obj.layout.xaxis.linecolor='rgb(0,0,0)'; -% obj.layout.xaxis.showgrid = true; -% obj.layout.xaxis.linewidth = 1; -% obj.layout.xaxis.type = 'linear'; -% obj.layout.xaxis.anchor = 'y1'; +obj.layout.xaxis1.autorange = false; obj.layout.xaxis1.mirror = true; -% -% -% obj.layout.yaxis.side = 'left'; -obj.layout.yaxis1.showline = false; + +obj.layout.yaxis1.showline = true; obj.layout.yaxis1.zeroline = false; -% obj.layout.yaxis.autorange = false; -% % obj.layout.yaxis.linecolor='rgb(0,0,0)'; -% obj.layout.yaxis.showgrid = true; -% obj.layout.yaxis.linewidth = 1; -% obj.layout.yaxis.type = 'linear'; -% obj.layout.yaxis.anchor = 'x1'; +obj.layout.yaxis1.autorange = false; obj.layout.yaxis1.mirror = true; -obj.layout.title.text=''; +%%%%%%%%%%%%%%% +%Useful for debugging!!! +obj.layout.xaxis1.tickmode='auto'; +obj.layout.xaxis1.nticks=11; +obj.layout.xaxis1.showticklabels=0; +obj.layout.yaxis1.tickmode='auto'; +obj.layout.yaxis1.nticks=11; +obj.layout.yaxis1.showticklabels=0; +%%%%%%%%%%%%%%% + +% obj.layout.title.text=''; obj.layout.margin.t=80; obj.layout.annotations{1}.text=''; @@ -72,39 +69,49 @@ function updateBubblecloud(obj,bcIndex) %-------------------------------------------------------------------------% -[sortedradii,sortind]=sort(sqrt(real(bcData.SizeData)),'descend'); -validind=isfinite(sortedradii) & sortedradii>0; -sortind=sortind(validind); -sortedradii=sortedradii(validind); +[sortedradii,RadiusIndex]=sort(sqrt(bcData.SizeData),'descend'); -if bcData.MaxDisplayBubbles < numel(sortind) - sortind=sortind(1:bcData.MaxDisplayBubbles); - sortedradii=sortedradii(1:bcData.MaxDisplayBubbles); -end -RadiusIndex=sortind; +sortedradii=sortedradii/max(sortedradii); -% Normalize radii so that the largest bubble has a radius of 1 -if ~isempty(sortedradii) - sortedradii=sortedradii/max(sortedradii); -end +ar = obj.layout.width/obj.layout.height; + +xIN = xaxis.domain(2) - xaxis.domain(1); +yIN = yaxis.domain(2) - yaxis.domain(1); +axAR = ar*xIN/yIN; -ar = 840/630; xy = matlab.graphics.internal.layoutBubbleCloud(sortedradii,ar); -fac=2*ar; -rads = 2*sortedradii * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); -% xy = matlab.graphics.internal.layoutBubbleCloud(rads,ar); -obj.layout.xaxis1.range=[fac*min(xy(1,:)), fac*max(xy(1,:))]; -obj.layout.yaxis1.range=[(fac/ar)*min(xy(2,:)), (fac/ar)*max(xy(2,:))]; +xR = [min(xy(1,:)-sortedradii), max(xy(1,:)+sortedradii)]; +yR = [min(xy(2,:)-sortedradii), max(xy(2,:)+sortedradii)]; + +xR = xR + [-0.025, 0.025]*abs(diff(xR)); +yR = yR + [-0.025, 0.025]*abs(diff(yR)); + +dataAR = abs(diff(xR))/abs(diff(yR)); + +if dataAR > axAR + amounttopad = abs(diff(yR)) * dataAR/axAR - abs(diff(yR)); + yR = yR + [-amounttopad/2, amounttopad/2]; +else + amounttopad = abs(diff(xR)) * axAR/dataAR - abs(diff(xR)); + xR = xR + [-amounttopad/2, amounttopad/2]; +end + +radX = (2*sortedradii * (xIN*840) / abs(diff(xR))); +% yR = [(yR(1)+yR(2))/2 - abs(diff(xR))/2, (yR(1)+yR(2))/2 + abs(diff(xR))/2]; + +% radY = (2*sortedradii * (yIN*630) / abs(diff(yR))); -% rads = 2*rads * (840 / ( fac*max(xy(1,:)) - fac*min(xy(1,:)))); +obj.layout.xaxis1.range=xR; +obj.layout.yaxis1.range=yR + [0.32,-0.32]; +rads=radX; %-------------------------------------------------------------------------% labels = bcData.LabelData(RadiusIndex); obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); -obj.data{bcIndex}.textfont = matlab2plotlyfont(bcData.FontName); +% obj.data{bcIndex}.textfont = matlab2plotlyfont(bcData.FontName); %-------------------------------------------------------------------------% From d27ac84db314dce0b5ec7939d6e7064135f72d7a Mon Sep 17 00:00:00 2001 From: Purwar Date: Tue, 21 Sep 2021 00:42:00 -1000 Subject: [PATCH 4/7] All done! --- .../handlegraphics/updateBubblecloud.m | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 14fdfdfe..42c73371 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -1,4 +1,4 @@ -function updateBubblecloud(obj,bcIndex) + function updateBubblecloud(obj,bcIndex) %-AXIS INDEX-% axIndex = obj.getAxisIndex(obj.State.Plot(bcIndex).AssociatedAxis); @@ -25,12 +25,12 @@ function updateBubblecloud(obj,bcIndex) %%%%%%%%%%%%%%% %Useful for debugging!!! -obj.layout.xaxis1.tickmode='auto'; -obj.layout.xaxis1.nticks=11; -obj.layout.xaxis1.showticklabels=0; -obj.layout.yaxis1.tickmode='auto'; -obj.layout.yaxis1.nticks=11; -obj.layout.yaxis1.showticklabels=0; +% obj.layout.xaxis1.tickmode='auto'; +% obj.layout.xaxis1.nticks=11; +% obj.layout.xaxis1.showticklabels=0; +% obj.layout.yaxis1.tickmode='auto'; +% obj.layout.yaxis1.nticks=11; +% obj.layout.yaxis1.showticklabels=0; %%%%%%%%%%%%%%% % obj.layout.title.text=''; @@ -84,8 +84,8 @@ function updateBubblecloud(obj,bcIndex) xR = [min(xy(1,:)-sortedradii), max(xy(1,:)+sortedradii)]; yR = [min(xy(2,:)-sortedradii), max(xy(2,:)+sortedradii)]; -xR = xR + [-0.025, 0.025]*abs(diff(xR)); -yR = yR + [-0.025, 0.025]*abs(diff(yR)); +xR = xR + [-0.125, 0.125]*abs(diff(xR)); +yR = yR + [-0.125, 0.125]*abs(diff(yR)); dataAR = abs(diff(xR))/abs(diff(yR)); @@ -98,12 +98,13 @@ function updateBubblecloud(obj,bcIndex) end radX = (2*sortedradii * (xIN*840) / abs(diff(xR))); +% radX = 0.8*radX; % yR = [(yR(1)+yR(2))/2 - abs(diff(xR))/2, (yR(1)+yR(2))/2 + abs(diff(xR))/2]; % radY = (2*sortedradii * (yIN*630) / abs(diff(yR))); obj.layout.xaxis1.range=xR; -obj.layout.yaxis1.range=yR + [0.32,-0.32]; +obj.layout.yaxis1.range=yR + [0.38,-0.38]; rads=radX; %-------------------------------------------------------------------------% From 29ec23dbecaa654b16aa998c2a733a639dd1e763 Mon Sep 17 00:00:00 2001 From: Purwar Date: Thu, 23 Sep 2021 08:30:09 -1000 Subject: [PATCH 5/7] Minor modifications --- .../handlegraphics/updateBubblecloud.m | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 42c73371..173180c5 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -97,26 +97,22 @@ function updateBubblecloud(obj,bcIndex) xR = xR + [-amounttopad/2, amounttopad/2]; end -radX = (2*sortedradii * (xIN*840) / abs(diff(xR))); -% radX = 0.8*radX; -% yR = [(yR(1)+yR(2))/2 - abs(diff(xR))/2, (yR(1)+yR(2))/2 + abs(diff(xR))/2]; - -% radY = (2*sortedradii * (yIN*630) / abs(diff(yR))); +radX = (2*sortedradii * (xIN*obj.layout.width) / abs(diff(xR))); obj.layout.xaxis1.range=xR; -obj.layout.yaxis1.range=yR + [0.38,-0.38]; +obj.layout.yaxis1.range=yR + [0.38, -0.38]; rads=radX; %-------------------------------------------------------------------------% labels = bcData.LabelData(RadiusIndex); obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); - -% obj.data{bcIndex}.textfont = matlab2plotlyfont(bcData.FontName); +obj.data{bcIndex}.textfont.family = matlab2plotlyfont(bcData.FontName); +obj.data{bcIndex}.textfont.color = sprintf('rgb(%i,%i,%i)',255*bcData.FontColor); +obj.data{bcIndex}.textfont.size = bcData.FontSize*1.5; %-------------------------------------------------------------------------% -% obj.data{bcIndex}.hoverinfo = ''; obj.data{bcIndex}.hovertemplate = 'Size: %{hovertext}
Label: %{text}'; obj.data{bcIndex}.hovertext = arrayfun(@(x) {num2str(x)}, bcData.SizeData(RadiusIndex)); From 4db8eab2270734759e1dcd91091e0c0de4cacfd0 Mon Sep 17 00:00:00 2001 From: Purwar Date: Sun, 26 Sep 2021 15:55:00 -1000 Subject: [PATCH 6/7] Updates --- plotly/plotlyfig_aux/core/updateData.m | 6 +- .../handlegraphics/updateBubblecloud.m | 329 ++++++++++-------- 2 files changed, 191 insertions(+), 144 deletions(-) diff --git a/plotly/plotlyfig_aux/core/updateData.m b/plotly/plotlyfig_aux/core/updateData.m index 7ae6d9aa..45c24b0a 100644 --- a/plotly/plotlyfig_aux/core/updateData.m +++ b/plotly/plotlyfig_aux/core/updateData.m @@ -34,7 +34,9 @@ elseif strcmpi(obj.PlotOptions.TreatAs, 'mesh') updateMesh(obj, dataIndex); elseif strcmpi(obj.PlotOptions.TreatAs, 'surfc') - updateSurfc(obj, dataIndex); + updateSurfc(obj, dataIndex); + elseif strcmpi(obj.PlotOptions.TreatAs, 'bubblecloud') + updateBubblecloud(obj,dataIndex); % this one will be revomed elseif strcmpi(obj.PlotOptions.TreatAs, 'streamtube') @@ -48,8 +50,6 @@ switch lower(obj.State.Plot(dataIndex).Class) %--CORE PLOT OBJECTS--% - case 'bubblecloud' - updateBubblecloud(obj,dataIndex); case 'scatterhistogram' updateScatterhistogram(obj, dataIndex); case 'wordcloud' diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 173180c5..0b9fb95a 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -1,10 +1,10 @@ - function updateBubblecloud(obj,bcIndex) +function updateBubblecloud(obj,~) %-AXIS INDEX-% -axIndex = obj.getAxisIndex(obj.State.Plot(bcIndex).AssociatedAxis); +axIndex = obj.getAxisIndex(obj.State.Plot(1).AssociatedAxis); %-BubbleCloud (bc) DATA STRUCTURE- % -bcData = get(obj.State.Plot(bcIndex).Handle); +bcData = get(obj.State.Plot(1).Handle); %-CHECK FOR MULTIPLE AXES-% [xsource, ysource] = findSourceAxis(obj,axIndex); @@ -25,49 +25,18 @@ function updateBubblecloud(obj,bcIndex) %%%%%%%%%%%%%%% %Useful for debugging!!! -% obj.layout.xaxis1.tickmode='auto'; -% obj.layout.xaxis1.nticks=11; -% obj.layout.xaxis1.showticklabels=0; -% obj.layout.yaxis1.tickmode='auto'; -% obj.layout.yaxis1.nticks=11; -% obj.layout.yaxis1.showticklabels=0; +obj.layout.xaxis1.tickmode='auto'; +obj.layout.xaxis1.nticks=11; +obj.layout.xaxis1.showticklabels=0; +obj.layout.yaxis1.tickmode='auto'; +obj.layout.yaxis1.nticks=11; +obj.layout.yaxis1.showticklabels=0; %%%%%%%%%%%%%%% % obj.layout.title.text=''; obj.layout.margin.t=80; obj.layout.annotations{1}.text=''; -%-------------------------------------------------------------------------% - -%-bc xaxis-% -obj.data{bcIndex}.xaxis = ['x' num2str(xsource)]; - -%-------------------------------------------------------------------------% - -%-bc yaxis-% -obj.data{bcIndex}.yaxis = ['y' num2str(ysource)]; - -%-------------------------------------------------------------------------% - -%-bc type-% -obj.data{bcIndex}.type = 'scatter'; - -%-------------------------------------------------------------------------% - -%-bc mode-% -obj.data{bcIndex}.mode = 'markers+text'; - -%-------------------------------------------------------------------------% - -%-bc visible-% -obj.data{bcIndex}.visible = strcmp(bcData.Visible,'on'); - -%-------------------------------------------------------------------------% - -%-bc name-% -obj.data{bcIndex}.name = bcData.LegendTitle; - -%-------------------------------------------------------------------------% [sortedradii,RadiusIndex]=sort(sqrt(bcData.SizeData),'descend'); @@ -79,10 +48,61 @@ function updateBubblecloud(obj,bcIndex) yIN = yaxis.domain(2) - yaxis.domain(1); axAR = ar*xIN/yIN; -xy = matlab.graphics.internal.layoutBubbleCloud(sortedradii,ar); +if isempty(bcData.GroupData) || all(bcData.GroupData==bcData.GroupData(1)) + XY = matlab.graphics.internal.layoutBubbleCloud(sortedradii,ar); + nGrps=1; + myIdx{1} = true(size(sortedradii)); +else + groups=bcData.GroupData(RadiusIndex); + undefined_ind=ismissing(groups); + grplist=unique(groups(~undefined_ind)); + groupradius=nan(numel(grplist),1); + for g=1:numel(grplist) + gp_ind=groups==grplist(g); + if any(gp_ind) + r=sortedradii(gp_ind); + xy=matlab.graphics.internal.layoutBubbleCloud(r,1); + groupradius(g)=max(sqrt(sum(xy.^2))+r); + XY(1:2,gp_ind)=xy; + end + end + + % Layout any nan/undefined as a separate group + if any(undefined_ind) + r=sortedradii(undefined_ind); + xy=matlab.graphics.internal.layoutBubbleCloud(r,1); + groupradius(end+1)=max(sqrt(sum(xy.^2))+r); + XY(1:2,undefined_ind)=xy; + end + + % Layout the circles that contain the groups + groupxyr=nan(3,numel(groupradius)); + groupxyr(3,:)=groupradius; + [gp_sortr,gp_sortind]=sort(groupradius,'descend'); + groupxyr(1:2,gp_sortind)=matlab.graphics.internal.layoutBubbleCloud(gp_sortr,ar); + + % Apply the group bubble position as an offset + for g=1:numel(grplist) + gp_ind=groups==grplist(g); + XY(1:2,gp_ind)=XY(1:2,gp_ind)+groupxyr(1:2,g); + end + + % Offset undefined group if it exists + if any(undefined_ind) + XY(1:2,undefined_ind)=XY(1:2,undefined_ind)+groupxyr(1:2,end); + end + + gps=unique(groups); + nGrps = numel(gps); + for i = 1:nGrps + gp_ind = groups == gps(i); + myIdx{i} = gp_ind; + end + +end -xR = [min(xy(1,:)-sortedradii), max(xy(1,:)+sortedradii)]; -yR = [min(xy(2,:)-sortedradii), max(xy(2,:)+sortedradii)]; +xR = [min(XY(1,:)-sortedradii), max(XY(1,:)+sortedradii)]; +yR = [min(XY(2,:)-sortedradii), max(XY(2,:)+sortedradii)]; xR = xR + [-0.125, 0.125]*abs(diff(xR)); yR = yR + [-0.125, 0.125]*abs(diff(yR)); @@ -100,124 +120,151 @@ function updateBubblecloud(obj,bcIndex) radX = (2*sortedradii * (xIN*obj.layout.width) / abs(diff(xR))); obj.layout.xaxis1.range=xR; -obj.layout.yaxis1.range=yR + [0.38, -0.38]; -rads=radX; -%-------------------------------------------------------------------------% - -labels = bcData.LabelData(RadiusIndex); -obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); -obj.data{bcIndex}.textfont.family = matlab2plotlyfont(bcData.FontName); -obj.data{bcIndex}.textfont.color = sprintf('rgb(%i,%i,%i)',255*bcData.FontColor); -obj.data{bcIndex}.textfont.size = bcData.FontSize*1.5; - -%-------------------------------------------------------------------------% - -obj.data{bcIndex}.hovertemplate = 'Size: %{hovertext}
Label: %{text}'; -obj.data{bcIndex}.hovertext = arrayfun(@(x) {num2str(x)}, bcData.SizeData(RadiusIndex)); - -%-------------------------------------------------------------------------% - -%-bc x-% -% if length(bcData) > 1 -% obj.data{bcIndex}.x(m) = bcData(n).XData; -% else - obj.data{bcIndex}.x = xy(1,:); -% end - -%---------------------------------------------------------------------% - -%-bc y-% -% if length(bcData) > 1 -% obj.data{bcIndex}.y(m) = bcData(n).YData; -% else - obj.data{bcIndex}.y = xy(2,:); -% end - -%---------------------------------------------------------------------% - -%-bc z-% -% if isHG2() -% if isfield(bcData,'ZData') -% if any(bcData.ZData) -% if length(bcData) > 1 -% obj.data{bcIndex}.z(m) = bcData(n).ZData; -% else -% obj.data{bcIndex}.z = bcData.ZData; -% end -% % overwrite type -% obj.data{bcIndex}.type = 'scatter3d'; -% end -% end -% end - -%---------------------------------------------------------------------% - -%-bc showlegend-% -try - leg = get(bcData.Annotation); -catch - leg=[]; +hei = obj.layout.height; +yCorr = -7.107E-13*hei^4 + 3.145E-09*hei^3 - 5.275E-06*hei^2 + 0.004197*hei - 1.602; + +% yCorr = -0.235; +if nGrps==1 + obj.layout.yaxis1.range = yR + [-yCorr, yCorr]; +else + obj.layout.yaxis1.range = yR + [0.16, -0.16]; end -if ~isempty(leg) - legInfo = get(leg.LegendInformation); - - switch legInfo.IconDisplayStyle - case 'on' - showleg = true; - case 'off' - showleg = false; +rads=radX; + +for bcIndex = 1:nGrps + %-------------------------------------------------------------------------% + + %-bc xaxis-% + obj.data{bcIndex}.xaxis = ['x' num2str(xsource)]; + + %-------------------------------------------------------------------------% + + %-bc yaxis-% + obj.data{bcIndex}.yaxis = ['y' num2str(ysource)]; + + %-------------------------------------------------------------------------% + + %-bc type-% + obj.data{bcIndex}.type = 'scatter'; + + %-------------------------------------------------------------------------% + + %-bc mode-% + obj.data{bcIndex}.mode = 'markers+text'; + + %-------------------------------------------------------------------------% + + %-bc visible-% + obj.data{bcIndex}.visible = strcmp(bcData.Visible,'on'); + + %-------------------------------------------------------------------------% + + labels = bcData.LabelData(RadiusIndex(myIdx{bcIndex})); + obj.data{bcIndex}.text = arrayfun(@(x) {char(x)}, labels); + obj.data{bcIndex}.textfont.family = matlab2plotlyfont(bcData.FontName); + obj.data{bcIndex}.textfont.color = sprintf('rgb(%i,%i,%i)',255*bcData.FontColor); + obj.data{bcIndex}.textfont.size = bcData.FontSize*1.5; + + %-------------------------------------------------------------------------% + + if isempty(bcData.SizeVariable) + bcData.SizeVariable='Size'; end -end + if isempty(bcData.LabelVariable) + bcData.LabelVariable='Label'; + end + if isempty(bcData.GroupVariable) + bcData.GroupVariable='Group'; + end + + if nGrps>1 + obj.data{bcIndex}.hovertemplate = sprintf('%s: %%{hovertext}
%s: %%{text}',bcData.SizeVariable,bcData.LabelVariable); + j = find(myIdx{bcIndex}); + obj.data{bcIndex}.name = char(bcData.GroupData(RadiusIndex(j(1)))); + obj.data{bcIndex}.hovertext = arrayfun(@(x,y) {num2str(x)}, bcData.SizeData(RadiusIndex(myIdx{bcIndex})), 'UniformOutput',false); + else + obj.data{bcIndex}.hovertemplate = sprintf('%s: %%{hovertext}
%s: %%{text}',bcData.SizeVariable,bcData.LabelVariable); + obj.data{bcIndex}.hovertext = arrayfun(@(x) {num2str(x)}, bcData.SizeData(RadiusIndex(myIdx{bcIndex}))); + end + + %-------------------------------------------------------------------------% + + obj.data{bcIndex}.x = XY(1,myIdx{bcIndex}); + + %---------------------------------------------------------------------% -if isfield(bcData,'ZData') - if isempty(bcData.ZData) - obj.data{bcIndex}.showlegend = showleg; + obj.data{bcIndex}.y = XY(2,myIdx{bcIndex}); + + %---------------------------------------------------------------------% + + %-bc showlegend-% + try + leg = get(bcData.Annotation); + catch + leg=[]; + end + if ~isempty(leg) + legInfo = get(leg.LegendInformation); + + switch legInfo.IconDisplayStyle + case 'on' + showleg = true; + case 'off' + showleg = false; + end end -end -%---------------------------------------------------------------------% + if isfield(bcData,'ZData') + if isempty(bcData.ZData) + obj.data{bcIndex}.showlegend = showleg; + end + end -%-line color-% -if length(bcData) > 1 - obj.data{bcIndex}.marker.line.color{m} = childmarker.line.color{1}; -else - col=uint8(bcData.EdgeColor*255); - obj.data{bcIndex}.marker.line.color = sprintf('rgb(%i,%i,%i)',col); -end + %---------------------------------------------------------------------% -%---------------------------------------------------------------------% + %-line color-% + if length(bcData) > 1 + obj.data{bcIndex}.marker.line.color{m} = childmarker.line.color{1}; + else + col=uint8(bcData.EdgeColor*255); + obj.data{bcIndex}.marker.line.color = sprintf('rgb(%i,%i,%i)',col); + end + + %---------------------------------------------------------------------% -%-marker color-% -col=uint8(bcData.ColorOrder(1,:)*255); -obj.data{bcIndex}.marker.color = sprintf('rgb(%i,%i,%i)',col); + %-marker color-% + col=uint8(bcData.ColorOrder(bcIndex,:)*255); + obj.data{bcIndex}.marker.color = sprintf('rgb(%i,%i,%i)',col); -%---------------------------------------------------------------------% + %---------------------------------------------------------------------% -%-sizeref-% -obj.data{bcIndex}.marker.sizeref = 1; + %-sizeref-% + obj.data{bcIndex}.marker.sizeref = 1; -%---------------------------------------------------------------------% + %---------------------------------------------------------------------% -%-sizemode-% -obj.data{bcIndex}.marker.sizemode = 'diameter'; + %-sizemode-% + obj.data{bcIndex}.marker.sizemode = 'diameter'; -%---------------------------------------------------------------------% + %---------------------------------------------------------------------% -%-symbol-% -obj.data{bcIndex}.marker.symbol = 'circle'; + %-symbol-% + obj.data{bcIndex}.marker.symbol = 'circle'; -%---------------------------------------------------------------------% + %---------------------------------------------------------------------% + + %-size-% + obj.data{bcIndex}.marker.size = rads(myIdx{bcIndex}); -%-size-% -obj.data{bcIndex}.marker.size = rads; + %---------------------------------------------------------------------% -%---------------------------------------------------------------------% + %-line width-% + obj.data{bcIndex}.marker.line.width = 1.5; -%-line width-% -obj.data{bcIndex}.marker.line.width = 1.5; + %---------------------------------------------------------------------% -%---------------------------------------------------------------------% +end end From b02bb69807419150f39639805d103bd0908e3271 Mon Sep 17 00:00:00 2001 From: Purwar Date: Sun, 26 Sep 2021 18:29:26 -1000 Subject: [PATCH 7/7] Remove debug info --- .../plotlyfig_aux/handlegraphics/updateBubblecloud.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m index 0b9fb95a..43646aa8 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBubblecloud.m @@ -25,12 +25,12 @@ function updateBubblecloud(obj,~) %%%%%%%%%%%%%%% %Useful for debugging!!! -obj.layout.xaxis1.tickmode='auto'; -obj.layout.xaxis1.nticks=11; -obj.layout.xaxis1.showticklabels=0; -obj.layout.yaxis1.tickmode='auto'; -obj.layout.yaxis1.nticks=11; -obj.layout.yaxis1.showticklabels=0; +% obj.layout.xaxis1.tickmode='auto'; +% obj.layout.xaxis1.nticks=11; +% obj.layout.xaxis1.showticklabels=0; +% obj.layout.yaxis1.tickmode='auto'; +% obj.layout.yaxis1.nticks=11; +% obj.layout.yaxis1.showticklabels=0; %%%%%%%%%%%%%%% % obj.layout.title.text='';