From 6e934355db07db6585530e80b532f597b0b14310 Mon Sep 17 00:00:00 2001 From: robertoffmoura Date: Mon, 12 Aug 2024 18:37:23 +0100 Subject: [PATCH 1/2] Add support for single point line plots --- plotly/plotlyfig_aux/handlegraphics/updateLineseries.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m b/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m index 26006e8f..f7ff5aab 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateLineseries.m @@ -51,7 +51,6 @@ function updateLineseries(obj, plotIndex) obj.data{plotIndex}.type = 'scatterpolar'; updateDefaultPolaraxes(obj, plotIndex) obj.data{plotIndex}.subplot = sprintf('polar%d', xSource+1); - elseif ~isPlot3D obj.data{plotIndex}.type = 'scatter'; obj.data{plotIndex}.xaxis = sprintf('x%d', xSource); @@ -73,11 +72,15 @@ function updateLineseries(obj, plotIndex) if isPolar obj.data{plotIndex}.r = rData; obj.data{plotIndex}.theta = thetaData; - else obj.data{plotIndex}.x = xData; obj.data{plotIndex}.y = yData; + if isscalar(xData) % plotly has trouble plotting a single point + obj.data{plotIndex}.x = repmat(obj.data{plotIndex}.x,[1,2]); + obj.data{plotIndex}.y = repmat(obj.data{plotIndex}.y,[1,2]); + end + if isPlot3D obj.data{plotIndex}.z = zData; obj.PlotOptions.is3d = true; From d691c57c832549f46a74afc14a1ac93bef071b72 Mon Sep 17 00:00:00 2001 From: robertoffmoura Date: Mon, 12 Aug 2024 19:11:13 +0100 Subject: [PATCH 2/2] Remove num2str, lint, and fix indentation --- plotly/plotly_offline_aux/plotlyoffline.m | 6 +- plotly/plotlyfig_aux/core/updateAxis.m | 53 ++---- .../core/updateAxisMultipleYAxes.m | 40 +--- .../plotlyfig_aux/core/updateConstantLine.m | 18 +- plotly/plotlyfig_aux/core/updateFigure.m | 177 ++++++++---------- .../core/updateHeatmapAnnotation.m | 4 +- .../handlegraphics/updateAlternativeBoxplot.m | 3 - .../handlegraphics/updateAnimatedLine.m | 14 +- .../plotlyfig_aux/handlegraphics/updateArea.m | 14 -- .../handlegraphics/updateBar3h.m | 2 - .../handlegraphics/updateBarseries.m | 27 +-- .../handlegraphics/updateBoxplot.m | 58 +----- .../updateCategoricalHistogram.m | 4 +- .../handlegraphics/updateComet.m | 4 +- .../handlegraphics/updateConeplot.m | 4 +- .../handlegraphics/updateContour3.m | 4 +- .../handlegraphics/updateContourProjection.m | 16 +- .../handlegraphics/updateErrorbar.m | 2 - .../handlegraphics/updateFunctionContour.m | 13 +- .../handlegraphics/updateFunctionSurface.m | 9 - .../handlegraphics/updateHistogram.m | 25 --- .../handlegraphics/updateHistogramPolar.m | 19 -- .../handlegraphics/updateImage.m | 9 +- .../handlegraphics/updateImage3D.m | 9 +- .../updateImplicitFunctionSurface.m | 9 +- .../plotlyfig_aux/handlegraphics/updateMesh.m | 9 - .../handlegraphics/updatePColor.m | 4 +- .../handlegraphics/updatePatch.m | 17 +- .../plotlyfig_aux/handlegraphics/updatePie3.m | 26 +-- .../handlegraphics/updateRectangle.m | 4 +- .../handlegraphics/updateScattergroup.m | 4 +- .../plotlyfig_aux/handlegraphics/updateStem.m | 14 -- .../handlegraphics/updateStreamtube.m | 4 +- .../handlegraphics/updateSurfaceplot.m | 4 +- .../handlegraphics/updateWordcloud.m | 5 - 35 files changed, 142 insertions(+), 492 deletions(-) diff --git a/plotly/plotly_offline_aux/plotlyoffline.m b/plotly/plotly_offline_aux/plotlyoffline.m index bff1454e..32f4c347 100644 --- a/plotly/plotly_offline_aux/plotlyoffline.m +++ b/plotly/plotly_offline_aux/plotlyoffline.m @@ -7,7 +7,7 @@ if plotlyfig.PlotOptions.IncludePlotlyjs % grab the bundled dependencies userHome = getuserdir(); - plotlyConfigFolder = fullfile(userHome,'.plotly'); + plotlyConfigFolder = fullfile(userHome,'.plotly'); plotlyJSFolder = fullfile(plotlyConfigFolder, 'plotlyjs'); bundleName = 'plotly-matlab-offline-bundle.js'; bundleFile = fullfile(plotlyJSFolder, bundleName); @@ -30,8 +30,8 @@ % handle plot div specs id = char(java.util.UUID.randomUUID); - width = [num2str(plotlyfig.layout.width) 'px']; - height = [num2str(plotlyfig.layout.height) 'px']; + width = plotlyfig.layout.width + "px"; + height = plotlyfig.layout.height + "px"; if plotlyfig.PlotOptions.ShowLinkText linkText = plotlyfig.PlotOptions.LinkText; diff --git a/plotly/plotlyfig_aux/core/updateAxis.m b/plotly/plotlyfig_aux/core/updateAxis.m index 34bcf337..905ea47b 100644 --- a/plotly/plotlyfig_aux/core/updateAxis.m +++ b/plotly/plotlyfig_aux/core/updateAxis.m @@ -69,17 +69,12 @@ %---------------------------------------------------------------------% - %-xaxis-% if isHeatmapAxis xaxis = extractHeatmapAxisData(obj,axisData, 'X'); xExponentFormat = 0; else [xaxis, xExponentFormat] = extractAxisData(obj,axisData, 'X'); end - - %---------------------------------------------------------------------% - - %-yaxis-% if isHeatmapAxis yaxis = extractHeatmapAxisData(obj,axisData, 'Y'); yExponentFormat = 0; @@ -87,23 +82,13 @@ [yaxis, yExponentFormat] = extractAxisData(obj,axisData, 'Y'); end - %---------------------------------------------------------------------% - - %-get position data-% axisPos = axisData.Position .* obj.PlotOptions.DomainFactor; if obj.PlotOptions.AxisEqual axisPos(3:4) = min(axisPos(3:4)); end - %---------------------------------------------------------------------% - - %-xaxis domain-% xaxis.domain = min([axisPos(1) sum(axisPos([1,3]))], 1); scene.domain.x = xaxis.domain; - - %---------------------------------------------------------------------% - - %-yaxis domain-% yaxis.domain = min([axisPos(2) sum(axisPos([2,4]))], 1); scene.domain.y = yaxis.domain; @@ -122,8 +107,8 @@ exponentText = sprintf('x10^%d', yExponentFormat); obj.layout.annotations{anIndex}.text = exponentText; - obj.layout.annotations{anIndex}.xref = ['x' num2str(xsource)]; - obj.layout.annotations{anIndex}.yref = ['y' num2str(ysource)]; + obj.layout.annotations{anIndex}.xref = "x" + xsource; + obj.layout.annotations{anIndex}.yref = "y" + ysource; obj.layout.annotations{anIndex}.xanchor = 'left'; obj.layout.annotations{anIndex}.yanchor = 'bottom'; obj.layout.annotations{anIndex}.font.size = yaxis.tickfont.size; @@ -142,8 +127,8 @@ exponentText = sprintf('x10^%d', xExponentFormat); obj.layout.annotations{anIndex}.text = exponentText; - obj.layout.annotations{anIndex}.xref = ['x' num2str(xsource)]; - obj.layout.annotations{anIndex}.yref = ['y' num2str(ysource)]; + obj.layout.annotations{anIndex}.xref = "x" + xsource; + obj.layout.annotations{anIndex}.yref = "y" + ysource; obj.layout.annotations{anIndex}.xanchor = 'left'; obj.layout.annotations{anIndex}.yanchor = 'bottom'; obj.layout.annotations{anIndex}.font.size = xaxis.tickfont.size; @@ -159,50 +144,38 @@ %---------------------------------------------------------------------% - %-xaxis anchor-% - xaxis.anchor = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% + xaxis.anchor = "y" + ysource; + yaxis.anchor = "x" + xsource; - %-yaxis anchor-% - yaxis.anchor = ['x' num2str(xsource)]; - - %---------------------------------------------------------------------% - - %-xaxis overlaying-% if xoverlay - xaxis.overlaying = ['x' num2str(xoverlay)]; + xaxis.overlaying = "x" + xoverlay; end - - %---------------------------------------------------------------------% - - %-yaxis overlaying-% if yoverlay - yaxis.overlaying = ['y' num2str(yoverlay)]; + yaxis.overlaying = "y" + yoverlay; end %---------------------------------------------------------------------% % update the layout field (do not overwrite source) if xsource == axIndex - obj.layout = setfield(obj.layout,['xaxis' num2str(xsource)],xaxis); - obj.layout = setfield(obj.layout,['scene' num2str(xsource)],scene); + obj.layout = setfield(obj.layout, "xaxis" + xsource, xaxis); + obj.layout = setfield(obj.layout, "scene" + xsource, scene); end %---------------------------------------------------------------------% % update the layout field (do not overwrite source) if ysource == axIndex - obj.layout = setfield(obj.layout,['yaxis' num2str(ysource)],yaxis); + obj.layout = setfield(obj.layout, "yaxis" + ysource, yaxis); end %---------------------------------------------------------------------% %-REVERT UNITS-% - set(obj.State.Axis(axIndex).Handle,'Units',axisUnits); + set(obj.State.Axis(axIndex).Handle, 'Units', axisUnits); try - set(obj.State.Axis(axIndex).Handle,'FontUnits',fontUnits); + set(obj.State.Axis(axIndex).Handle, 'FontUnits', fontUnits); catch % TODO end diff --git a/plotly/plotlyfig_aux/core/updateAxisMultipleYAxes.m b/plotly/plotlyfig_aux/core/updateAxisMultipleYAxes.m index 4cb30451..5f893092 100644 --- a/plotly/plotlyfig_aux/core/updateAxisMultipleYAxes.m +++ b/plotly/plotlyfig_aux/core/updateAxisMultipleYAxes.m @@ -17,12 +17,7 @@ %---------------------------------------------------------------------% - %-xaxis-% xaxis = extractAxisData(obj,axisData, 'X'); - - %---------------------------------------------------------------------% - - %-yaxis-% [yaxis, yAxisLim] = extractAxisDataMultipleYAxes(obj, axisData, yaxIndex); %---------------------------------------------------------------------% @@ -42,13 +37,8 @@ %---------------------------------------------------------------------% - %-xaxis domain-% xaxis.domain = min([xo xo + w],1); scene.domain.x = min([xo xo + w],1); - - %---------------------------------------------------------------------% - - %-yaxis domain-% yaxis.domain = min([yo yo + h],1); scene.domain.y = min([yo yo + h],1); @@ -58,39 +48,27 @@ %---------------------------------------------------------------------% - %-xaxis anchor-% - xaxis.anchor = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% + xaxis.anchor = "y" + ysource; + yaxis.anchor = "x" + xsource; - %-yaxis anchor-% - yaxis.anchor = ['x' num2str(xsource)]; - - %---------------------------------------------------------------------% - - %-xaxis overlaying-% if xoverlay - xaxis.overlaying = ['x' num2str(xoverlay)]; + xaxis.overlaying = "x" + xoverlay; end - - %---------------------------------------------------------------------% - - %-yaxis overlaying-% if yoverlay - yaxis.overlaying = ['y' num2str(yoverlay)]; + yaxis.overlaying = "y" + yoverlay; end %---------------------------------------------------------------------% % update the layout field (do not overwrite source) if xsource == axIndex - obj.layout = setfield(obj.layout,['xaxis' num2str(xsource)],xaxis); + obj.layout = setfield(obj.layout, "xaxis" + xsource, xaxis); end %---------------------------------------------------------------------% % update the layout field (do not overwrite source) - obj.layout = setfield(obj.layout,['yaxis' num2str(ysource)],yaxis); + obj.layout = setfield(obj.layout, "yaxis" + ysource, yaxis); %---------------------------------------------------------------------% @@ -110,8 +88,6 @@ plotIndex = obj.PlotOptions.nPlots; obj.data{plotIndex}.type = 'scatter'; - obj.data{plotIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{plotIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% + obj.data{plotIndex}.xaxis = "x" + xsource; + obj.data{plotIndex}.yaxis = "y" + ysource; end diff --git a/plotly/plotlyfig_aux/core/updateConstantLine.m b/plotly/plotlyfig_aux/core/updateConstantLine.m index 9a62985f..13214824 100644 --- a/plotly/plotlyfig_aux/core/updateConstantLine.m +++ b/plotly/plotlyfig_aux/core/updateConstantLine.m @@ -10,28 +10,14 @@ function updateConstantLine(obj,plotIndex) %---------------------------------------------------------------------% - %-scatter xaxis-% - obj.data{plotIndex}.xaxis = ["x" num2str(xsource)]; - - %---------------------------------------------------------------------% - - %-scatter yaxis-% - obj.data{plotIndex}.yaxis = ["y" num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-scatter type-% + obj.data{plotIndex}.xaxis = "x" + xsource; + obj.data{plotIndex}.yaxis = "y" + ysource; obj.data{plotIndex}.type = "scatter"; - - %---------------------------------------------------------------------% - - %-scatter visible-% obj.data{plotIndex}.visible = strcmp(plotData.Visible, "on"); %---------------------------------------------------------------------% %-scatter-% - xaxis = obj.layout.("xaxis"+xsource); yaxis = obj.layout.("yaxis"+ysource); value = [plotData.Value plotData.Value]; diff --git a/plotly/plotlyfig_aux/core/updateFigure.m b/plotly/plotlyfig_aux/core/updateFigure.m index 908c1640..f72c0af7 100644 --- a/plotly/plotlyfig_aux/core/updateFigure.m +++ b/plotly/plotlyfig_aux/core/updateFigure.m @@ -1,106 +1,77 @@ %----UPDATE FIGURE DATA/LAYOUT----% - function obj = updateFigure(obj) - -%--------PLOTLY LAYOUT FIELDS---------% - -% title ..........[HANDLED BY updateAxis] -% titlefont ..........[HANDLED BY updateAxis] -% font ..........[HANDLED BY updateAxis] -% showlegend ..........[HANDLED BY updateAxis] -% autosize ... DONE -% width ... DONE -% height .... DONE -% xaxis ..........[HANDLED BY updateAxis] -% yaxis ..........[HANDLED BY updateAxis] -% legend ..........[HANDLED BY updateAxis] -% annotations ..........[HANDLED BY updateAnnotation] -% margin ...DONE -% paper_bgcolor ...DONE -% plot_bgcolor ..........[HANDLED BY updateAxis] -% hovermode ..........[NOT SUPPORTED IN MATLAB] -% dragmode ..........[NOT SUPPORTED IN MATLAB] -% separators ..........[NOT SUPPORTED IN MATLAB] -% barmode ..........[HANDLED BY updateBar] -% bargap ..........[HANDLED BY updateBar] -% bargroupgap ..........[HANDLED BY updateBar] -% boxmode ..........[HANDLED BY updateBox] -% radialaxis ..........[HANDLED BY updatePolar] -% angularaxis ..........[HANDLED BY updatePolar] -% direction ..........[HANDLED BY updatePolar] -% orientation ..........[HANDLED BY updatePolar] -% hidesources ..........[NOT SUPPORTED IN MATLAB] - - -%-STANDARDIZE UNITS-% -figunits = obj.State.Figure.Handle.Units; -set(obj.State.Figure.Handle,'Units','pixels'); - -%-FIGURE DATA-% -figure_data = obj.State.Figure.Handle; - -%-------------------------------------------------------------------------% - -%-figure autosize-% -obj.layout.autosize = false; - -%-------------------------------------------------------------------------% - -%-figure margin pad-% -obj.layout.margin.pad = obj.PlotlyDefaults.MarginPad; - -%-------------------------------------------------------------------------% - -%-figure show legend-% -if (obj.State.Figure.NumLegends > 1) - obj.layout.showlegend = true; -else - obj.layout.showlegend = false; + %--------PLOTLY LAYOUT FIELDS---------% + + % title ..........[HANDLED BY updateAxis] + % titlefont ..........[HANDLED BY updateAxis] + % font ..........[HANDLED BY updateAxis] + % showlegend ..........[HANDLED BY updateAxis] + % autosize ... DONE + % width ... DONE + % height .... DONE + % xaxis ..........[HANDLED BY updateAxis] + % yaxis ..........[HANDLED BY updateAxis] + % legend ..........[HANDLED BY updateAxis] + % annotations ..........[HANDLED BY updateAnnotation] + % margin ...DONE + % paper_bgcolor ...DONE + % plot_bgcolor ..........[HANDLED BY updateAxis] + % hovermode ..........[NOT SUPPORTED IN MATLAB] + % dragmode ..........[NOT SUPPORTED IN MATLAB] + % separators ..........[NOT SUPPORTED IN MATLAB] + % barmode ..........[HANDLED BY updateBar] + % bargap ..........[HANDLED BY updateBar] + % bargroupgap ..........[HANDLED BY updateBar] + % boxmode ..........[HANDLED BY updateBox] + % radialaxis ..........[HANDLED BY updatePolar] + % angularaxis ..........[HANDLED BY updatePolar] + % direction ..........[HANDLED BY updatePolar] + % orientation ..........[HANDLED BY updatePolar] + % hidesources ..........[NOT SUPPORTED IN MATLAB] + + + %-STANDARDIZE UNITS-% + figunits = obj.State.Figure.Handle.Units; + set(obj.State.Figure.Handle,'Units','pixels'); + + %-FIGURE DATA-% + figure_data = obj.State.Figure.Handle; + + %---------------------------------------------------------------------% + + obj.layout.autosize = false; + obj.layout.margin.pad = obj.PlotlyDefaults.MarginPad; + + if (obj.State.Figure.NumLegends > 1) + obj.layout.showlegend = true; + else + obj.layout.showlegend = false; + end + + obj.layout.margin.l = 0; + obj.layout.margin.r = 0; + obj.layout.margin.b = 0; + obj.layout.margin.t = 0; + + %---------------------------------------------------------------------% + + if obj.PlotOptions.AxisEqual + wh = min(figure_data.Position(3:4)); + w = wh; + h = wh; + else + w = figure_data.Position(3); + h = figure_data.Position(4); + end + + obj.layout.width = w * obj.PlotlyDefaults.FigureIncreaseFactor; + obj.layout.height = h * obj.PlotlyDefaults.FigureIncreaseFactor; + + col = round(255*figure_data.Color); + obj.layout.paper_bgcolor = sprintf("rgb(%d,%d,%d)", col); + + obj.layout.hovermode = 'closest'; + + %-REVERT UNITS-% + set(obj.State.Figure.Handle,'Units',figunits); end - -%-------------------------------------------------------------------------% - -%-margins-% -obj.layout.margin.l = 0; -obj.layout.margin.r = 0; -obj.layout.margin.b = 0; -obj.layout.margin.t = 0; - -%-------------------------------------------------------------------------% - -if obj.PlotOptions.AxisEqual - wh = min(figure_data.Position(3:4)); - w = wh; - h = wh; -else - w = figure_data.Position(3); - h = figure_data.Position(4); -end - -%-figure width-% -obj.layout.width = w * obj.PlotlyDefaults.FigureIncreaseFactor; - -%-------------------------------------------------------------------------% - -%-figure height-% -obj.layout.height = h * obj.PlotlyDefaults.FigureIncreaseFactor; - -%-------------------------------------------------------------------------% - -%-figure paper bgcolor-% -col = 255*figure_data.Color; -obj.layout.paper_bgcolor = ['rgb(' num2str(col(1)) ',' num2str(col(2)) ',' num2str(col(3)) ')']; - -%-------------------------------------------------------------------------% - -%-figure hovermode-% -obj.layout.hovermode = 'closest'; - -%-------------------------------------------------------------------------% - -%-REVERT UNITS-% -set(obj.State.Figure.Handle,'Units',figunits); - -end - - diff --git a/plotly/plotlyfig_aux/core/updateHeatmapAnnotation.m b/plotly/plotlyfig_aux/core/updateHeatmapAnnotation.m index c4e91585..81b186a1 100644 --- a/plotly/plotlyfig_aux/core/updateHeatmapAnnotation.m +++ b/plotly/plotlyfig_aux/core/updateHeatmapAnnotation.m @@ -54,9 +54,9 @@ obj.layout.annotations{axIndex}.yref = 'paper'; else %-xref-% - obj.layout.annotations{axIndex}.xref = ['x' num2str(xsource)]; + obj.layout.annotations{axIndex}.xref = "x" + xsource; %-yref-% - obj.layout.annotations{axIndex}.yref = ['y' num2str(ysource)]; + obj.layout.annotations{axIndex}.yref = "y" + ysource; end %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateAlternativeBoxplot.m b/plotly/plotlyfig_aux/handlegraphics/updateAlternativeBoxplot.m index 4eac7259..42e21649 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateAlternativeBoxplot.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateAlternativeBoxplot.m @@ -63,10 +63,7 @@ function updateBoxplotLine(obj, axIndex, plotData, traceIndex) %---------------------------------------------------------------------% - %-set marker properties-% obj.data{traceIndex}.marker = extractLineMarker(plotData); - - %-set line properties-% obj.data{traceIndex}.line = extractLineLine(plotData); %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateAnimatedLine.m b/plotly/plotlyfig_aux/handlegraphics/updateAnimatedLine.m index de98a3b3..69365955 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateAnimatedLine.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateAnimatedLine.m @@ -41,13 +41,8 @@ function updateAnimatedLine(obj,plotIndex) %---------------------------------------------------------------------% - %-scatter xaxis-% - obj.data{plotIndex}.xaxis = ['x' num2str(xsource)]; - - %---------------------------------------------------------------------% - - %-scatter yaxis-% - obj.data{plotIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{plotIndex}.xaxis = "x" + xsource; + obj.data{plotIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% @@ -126,12 +121,7 @@ function updateAnimatedLine(obj,plotIndex) %---------------------------------------------------------------------% - %-scatter line-% obj.data{plotIndex}.line = extractLineLine(plotData); - - %---------------------------------------------------------------------% - - %-scatter marker-% obj.data{plotIndex}.marker = extractLineMarker(plotData); %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateArea.m b/plotly/plotlyfig_aux/handlegraphics/updateArea.m index f8ca60c2..20dd83b2 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateArea.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateArea.m @@ -71,18 +71,9 @@ function updateArea(obj,areaIndex) %---------------------------------------------------------------------% - %-area axis-% obj.data{areaIndex}.xaxis = "x" + xsource; obj.data{areaIndex}.yaxis = "y" + ysource; - - %---------------------------------------------------------------------% - - %-area type-% obj.data{areaIndex}.type = "scatter"; - - %---------------------------------------------------------------------% - - %-area x-% obj.data{areaIndex}.x = area_data.XData; %---------------------------------------------------------------------% @@ -99,12 +90,7 @@ function updateArea(obj,areaIndex) %---------------------------------------------------------------------% - %-area name-% obj.data{areaIndex}.name = area_data.DisplayName; - - %---------------------------------------------------------------------% - - %-area visible-% obj.data{areaIndex}.visible = strcmp(area_data.Visible, "on"); %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBar3h.m b/plotly/plotlyfig_aux/handlegraphics/updateBar3h.m index 869dd431..420d0f6b 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBar3h.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBar3h.m @@ -19,8 +19,6 @@ %-associate scene-% obj.data{surfaceIndex}.scene = sprintf('scene%d', xsource); - - %---------------------------------------------------------------------% %-surface type-% obj.data{surfaceIndex}.type = 'mesh3d'; diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBarseries.m b/plotly/plotlyfig_aux/handlegraphics/updateBarseries.m index 9f44c674..1d221e5e 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBarseries.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBarseries.m @@ -71,28 +71,12 @@ %---------------------------------------------------------------------% - %-bar xaxis and yaxis -% - obj.data{barIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{barIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-bar visible-% + obj.data{barIndex}.xaxis = "x" + xsource; + obj.data{barIndex}.yaxis = "y" + ysource; obj.data{barIndex}.visible = strcmp(bar_data.Visible,'on'); - - %---------------------------------------------------------------------% - - %-bar type-% obj.data{barIndex}.type = 'bar'; - - %---------------------------------------------------------------------% - - %-bar name-% obj.data{barIndex}.name = bar_data.DisplayName; - %---------------------------------------------------------------------% - - %-layout barmode-% switch bar_data.BarLayout case 'grouped' obj.layout.barmode = 'group'; @@ -100,14 +84,7 @@ obj.layout.barmode = 'stack'; end - %---------------------------------------------------------------------% - - %-layout bargroupgap-% obj.layout.bargroupgap = 1-bar_data.BarWidth; - - %---------------------------------------------------------------------% - - %-layout bargap-% obj.layout.bargap = obj.PlotlyDefaults.Bargap; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateBoxplot.m b/plotly/plotlyfig_aux/handlegraphics/updateBoxplot.m index 40febed2..fa2ef588 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateBoxplot.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateBoxplot.m @@ -73,17 +73,8 @@ end end - % initialize ydata ydata = []; - - %---------------------------------------------------------------------% - - %-box groupgap-% obj.layout.bargroupgap = 1/bpnum; - - %---------------------------------------------------------------------% - - %-box name-% obj.data{boxIndex}.name = box_data.DisplayName; %---------------------------------------------------------------------% @@ -97,26 +88,10 @@ %-AXIS DATA-% xaxis = obj.layout.("xaxis" + xsource); yaxis = obj.layout.("yaxis" + ysource); - - %-----------------------------------------------------------------% - - %-box xaxis and yaxis-% - obj.data{boxIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{boxIndex}.yaxis = ['y' num2str(ysource)]; - - %-----------------------------------------------------------------% - - %-box type-% + obj.data{boxIndex}.xaxis = "x" + xsource; + obj.data{boxIndex}.yaxis = "y" + ysource; obj.data{boxIndex}.type = 'box'; - - %-----------------------------------------------------------------% - - %-box visible-% obj.data{boxIndex}.visible = strcmp(box_data.Visible,'on'); - - %-----------------------------------------------------------------% - - %-box fillcolor-% obj.data{boxIndex}.fillcolor = 'rgba(0, 0, 0, 0)'; %-----------------------------------------------------------------% @@ -233,46 +208,21 @@ fontunits = text_child(1).FontUnits; set(text_child(1), 'FontUnits', 'points'); - %-text data -% text_data = text_child(1); - - %---------------------------------------------------------------------% - - %-xaxis tick font size-% xaxis.tickfont.size = text_data.FontSize; - - %---------------------------------------------------------------------% - - %-xaxis tick font family-% xaxis.tickfont.family = matlab2plotlyfont(text_data.FontName); - - %---------------------------------------------------------------------% - - %-xaxis tick font color-% xaxis.tickfont.color = text_data.Color; - - %---------------------------------------------------------------------% - - %-axis type-% xaxis.type = 'category'; - - %---------------------------------------------------------------------% - - %-show tick labels-% xaxis.showticklabels = true; - - %---------------------------------------------------------------------% - - %-autorange-% xaxis.autorange = true; %---------------------------------------------------------------------% %-set the layout axis field-% - obj.layout = setfield(obj.layout,['xaxis' num2str(xsource)],xaxis); + obj.layout = setfield(obj.layout, "xaxis" + xsource, xaxis); %---------------------------------------------------------------------% %-REVERT UNITS-% - set(text_child(1),'FontUnits',fontunits); + set(text_child(1), 'FontUnits', fontunits); end diff --git a/plotly/plotlyfig_aux/handlegraphics/updateCategoricalHistogram.m b/plotly/plotlyfig_aux/handlegraphics/updateCategoricalHistogram.m index 7076f9eb..ed70cef2 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateCategoricalHistogram.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateCategoricalHistogram.m @@ -63,8 +63,8 @@ %---------------------------------------------------------------------% %-hist xaxis and yaxis-% - obj.data{histIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{histIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{histIndex}.xaxis = "x" + xsource; + obj.data{histIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateComet.m b/plotly/plotlyfig_aux/handlegraphics/updateComet.m index f635025e..583b6c3f 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateComet.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateComet.m @@ -85,8 +85,8 @@ function updateComet(obj,plotIndex) %---------------------------------------------------------------------% %-scatter xaxis and yaxis-% - obj.data{plotIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{plotIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{plotIndex}.xaxis = "x" + xsource; + obj.data{plotIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateConeplot.m b/plotly/plotlyfig_aux/handlegraphics/updateConeplot.m index 798e3c80..8df7eab4 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateConeplot.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateConeplot.m @@ -157,6 +157,6 @@ %---------------------------------------------------------------------% %-set scene to layout-% - obj.layout = setfield(obj.layout,['scene' num2str(xsource)], scene); - obj.data{coneIndex}.scene = ['scene' num2str(xsource)]; + obj.layout = setfield(obj.layout,"scene" + xsource, scene); + obj.data{coneIndex}.scene = "scene" + xsource; end diff --git a/plotly/plotlyfig_aux/handlegraphics/updateContour3.m b/plotly/plotlyfig_aux/handlegraphics/updateContour3.m index b0addeef..3f87b4ba 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateContour3.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateContour3.m @@ -21,8 +21,8 @@ %---------------------------------------------------------------------% %-contour xaxis and yaxis-% - obj.data{contourIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{contourIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{contourIndex}.xaxis = "x" + xsource; + obj.data{contourIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateContourProjection.m b/plotly/plotlyfig_aux/handlegraphics/updateContourProjection.m index d39925ff..1516cd13 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateContourProjection.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateContourProjection.m @@ -20,13 +20,8 @@ %---------------------------------------------------------------------% - %-contour xaxis and yaxis-% - obj.data{contourIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{contourIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-contour name-% + obj.data{contourIndex}.xaxis = "x" + xsource; + obj.data{contourIndex}.yaxis = "y" + ysource; obj.data{contourIndex}.name = contour_data.DisplayName; %---------------------------------------------------------------------% @@ -61,13 +56,7 @@ %---------------------------------------------------------------------% - %-contour visible-% - obj.data{contourIndex}.visible = strcmp(contour_data.Visible,'on'); - - %---------------------------------------------------------------------% - - %-contour showscale-% obj.data{contourIndex}.showscale = false; %---------------------------------------------------------------------% @@ -136,7 +125,6 @@ %---------------------------------------------------------------------% %-contour showlegend-% - leg = contour_data.Annotation; legInfo = leg.LegendInformation; diff --git a/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m b/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m index 59cb3fe7..7bf43ae7 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateErrorbar.m @@ -31,10 +31,8 @@ %---------------------------------------------------------------------% %-set errorbar data-% - obj.data{plotIndex}.error_y.array = yPositiveDelta; obj.data{plotIndex}.error_x.array = xPositiveDelta; - obj.data{plotIndex}.error_x.arrayminus = xNegativeDelta; obj.data{plotIndex}.error_y.arrayminus = yNegativeDelta; diff --git a/plotly/plotlyfig_aux/handlegraphics/updateFunctionContour.m b/plotly/plotlyfig_aux/handlegraphics/updateFunctionContour.m index 24574963..ec4764c7 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateFunctionContour.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateFunctionContour.m @@ -20,18 +20,9 @@ %---------------------------------------------------------------------% - %-contour xaxis and yaxis-% - obj.data{contourIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{contourIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-contour name-% + obj.data{contourIndex}.xaxis = "x" + xsource; + obj.data{contourIndex}.yaxis = "y" + ysource; obj.data{contourIndex}.name = contour_data.DisplayName; - - %---------------------------------------------------------------------% - - %-contour type-% obj.data{contourIndex}.type = 'contour'; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateFunctionSurface.m b/plotly/plotlyfig_aux/handlegraphics/updateFunctionSurface.m index f5b04f9a..224b7f0a 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateFunctionSurface.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateFunctionSurface.m @@ -314,19 +314,10 @@ %---------------------------------------------------------------------% - %-surface name-% obj.data{surfaceIndex}.name = meshData.DisplayName; obj.data{contourIndex}.name = meshData.DisplayName; - - %---------------------------------------------------------------------% - - %-surface showscale-% obj.data{surfaceIndex}.showscale = false; obj.data{contourIndex}.showscale = false; - - %---------------------------------------------------------------------% - - %-surface visible-% obj.data{surfaceIndex}.visible = strcmp(meshData.Visible,'on'); obj.data{contourIndex}.visible = strcmp(meshData.Visible,'on'); diff --git a/plotly/plotlyfig_aux/handlegraphics/updateHistogram.m b/plotly/plotlyfig_aux/handlegraphics/updateHistogram.m index bf65ece6..5233e052 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateHistogram.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateHistogram.m @@ -58,13 +58,8 @@ %---------------------------------------------------------------------% - %-hist axis-% obj.data{histIndex}.xaxis = "x" + xsource; obj.data{histIndex}.yaxis = "y" + ysource; - - %---------------------------------------------------------------------% - - %-bar type-% obj.data{histIndex}.type = "bar"; %---------------------------------------------------------------------% @@ -153,38 +148,18 @@ %---------------------------------------------------------------------% - %-hist name-% obj.data{histIndex}.name = hist_data.DisplayName; - - %---------------------------------------------------------------------% - - %-layout barmode-% obj.layout.barmode = "overlay"; - - %---------------------------------------------------------------------% - - %-hist line width-% obj.data{histIndex}.marker.line.width = hist_data.LineWidth; - %---------------------------------------------------------------------% - %-hist opacity-% if ~ischar(hist_data.FaceAlpha) obj.data{histIndex}.opacity = hist_data.FaceAlpha * 1.25; end - %---------------------------------------------------------------------% - - %-marker data-% obj.data{histIndex}.marker = extractPatchFace(hist_data); - - %---------------------------------------------------------------------% - - %-hist visible-% obj.data{histIndex}.visible = strcmp(hist_data.Visible,"on"); - %---------------------------------------------------------------------% - %-hist showlegend-% leg = hist_data.Annotation; legInfo = leg.LegendInformation; diff --git a/plotly/plotlyfig_aux/handlegraphics/updateHistogramPolar.m b/plotly/plotlyfig_aux/handlegraphics/updateHistogramPolar.m index b29282f1..c507da21 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateHistogramPolar.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateHistogramPolar.m @@ -68,37 +68,18 @@ %---------------------------------------------------------------------% - %-hist name-% obj.data{histIndex}.name = hist_data.DisplayName; - - %---------------------------------------------------------------------% - - %-layout barmode-% obj.layout.barmode = 'group'; - - %---------------------------------------------------------------------% - - %-hist line width-% obj.data{histIndex}.marker.line.width = hist_data.LineWidth; - %---------------------------------------------------------------------% - %-hist opacity-% if ~ischar(hist_data.FaceAlpha) obj.data{histIndex}.opacity = hist_data.FaceAlpha; end - %---------------------------------------------------------------------% - obj.data{histIndex}.marker = extractPatchFace(hist_data); - - %---------------------------------------------------------------------% - - %-hist visible-% obj.data{histIndex}.visible = strcmp(hist_data.Visible,'on'); - %---------------------------------------------------------------------% - %-hist showlegend-% leg = hist_data.Annotation; legInfo = leg.LegendInformation; diff --git a/plotly/plotlyfig_aux/handlegraphics/updateImage.m b/plotly/plotlyfig_aux/handlegraphics/updateImage.m index 46cda45d..7d04576b 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateImage.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateImage.m @@ -47,13 +47,8 @@ %---------------------------------------------------------------------% - %-image xaxis and yaxis-% - obj.data{imageIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{imageIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-image type-% + obj.data{imageIndex}.xaxis = "x" + xsource; + obj.data{imageIndex}.yaxis = "y" + ysource; obj.data{imageIndex}.type = 'heatmap'; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateImage3D.m b/plotly/plotlyfig_aux/handlegraphics/updateImage3D.m index f6f158d0..80b2473e 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateImage3D.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateImage3D.m @@ -48,13 +48,8 @@ %---------------------------------------------------------------------% - %-image xaxis and yaxis-% - obj.data{imageIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{imageIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-image type-% + obj.data{imageIndex}.xaxis = "x" + xsource; + obj.data{imageIndex}.yaxis = "y" + ysource; obj.data{imageIndex}.type = 'surface'; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateImplicitFunctionSurface.m b/plotly/plotlyfig_aux/handlegraphics/updateImplicitFunctionSurface.m index 6901c5ca..89fd2169 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateImplicitFunctionSurface.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateImplicitFunctionSurface.m @@ -15,13 +15,8 @@ %---------------------------------------------------------------------% - %-surface xaxis and yaxis-% - obj.data{surfaceIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{surfaceIndex}.yaxis = ['y' num2str(ysource)]; - - %---------------------------------------------------------------------% - - %-surface type-% + obj.data{surfaceIndex}.xaxis = "x" + xsource; + obj.data{surfaceIndex}.yaxis = "y" + ysource; obj.data{surfaceIndex}.type = 'surface'; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateMesh.m b/plotly/plotlyfig_aux/handlegraphics/updateMesh.m index 253df1e4..89d58634 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateMesh.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateMesh.m @@ -381,19 +381,10 @@ %---------------------------------------------------------------------% - %-surface name-% obj.data{surfaceIndex}.name = meshData.DisplayName; obj.data{contourIndex}.name = meshData.DisplayName; - - %---------------------------------------------------------------------% - - %-surface showscale-% obj.data{surfaceIndex}.showscale = false; obj.data{contourIndex}.showscale = false; - - %---------------------------------------------------------------------% - - %-surface visible-% obj.data{surfaceIndex}.visible = strcmp(meshData.Visible,'on'); obj.data{contourIndex}.visible = strcmp(meshData.Visible,'on'); diff --git a/plotly/plotlyfig_aux/handlegraphics/updatePColor.m b/plotly/plotlyfig_aux/handlegraphics/updatePColor.m index 50238377..c22c7453 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updatePColor.m +++ b/plotly/plotlyfig_aux/handlegraphics/updatePColor.m @@ -16,8 +16,8 @@ %---------------------------------------------------------------------% %-pcolor xaxis and yaxis-% - obj.data{patchIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{patchIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{patchIndex}.xaxis = "x" + xsource; + obj.data{patchIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updatePatch.m b/plotly/plotlyfig_aux/handlegraphics/updatePatch.m index 3f7c8085..1824f0a4 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updatePatch.m +++ b/plotly/plotlyfig_aux/handlegraphics/updatePatch.m @@ -59,8 +59,8 @@ %---------------------------------------------------------------------% %-patch xaxis and yaxis-% - obj.data{patchIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{patchIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{patchIndex}.xaxis = "x" + xsource; + obj.data{patchIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% @@ -127,12 +127,7 @@ %-----------------------------------------------------------------% - %-patch name-% obj.data{patchIndex}.name = patch_data.DisplayName; - - %-----------------------------------------------------------------% - - %-patch visible-% obj.data{patchIndex}.visible = strcmp(patch_data.Visible,'on'); %-----------------------------------------------------------------% @@ -153,15 +148,7 @@ end obj.data{patchIndex}.mode = mode; - - %-----------------------------------------------------------------% - - %-patch marker-% obj.data{patchIndex}.marker = extractPatchMarker(patch_data); - - %-----------------------------------------------------------------% - - %-patch line-% obj.data{patchIndex}.line = extractPatchLine(patch_data); %-----------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updatePie3.m b/plotly/plotlyfig_aux/handlegraphics/updatePie3.m index 162ed4ca..b91513aa 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updatePie3.m +++ b/plotly/plotlyfig_aux/handlegraphics/updatePie3.m @@ -74,16 +74,13 @@ function updatePie3(obj,plotIndex) %-AXIS DATA-% scene = obj.layout.("scene" + xsource); - obj.PlotOptions.scene_anchor = ['scene' num2str(xsource)]; + obj.PlotOptions.scene_anchor = "scene" + xsource; %---------------------------------------------------------------------% %-scene to be set-% obj.PlotOptions.scene = scene; - %---------------------------------------------------------------------% - - %-patch type-% obj.data{patchIndex}.type = 'scatter3d'; %---------------------------------------------------------------------% @@ -164,15 +161,7 @@ function updatePie3(obj,plotIndex) end obj.data{patchIndex}.mode = mode; - - %---------------------------------------------------------------------% - - %-patch marker-% obj.data{patchIndex}.marker = extractPatchMarker(patch_data); - - %---------------------------------------------------------------------% - - %-patch line-% obj.data{patchIndex}.line = extractPatchLine(patch_data); %---------------------------------------------------------------------% @@ -222,7 +211,7 @@ function updatePie3(obj,plotIndex) %-AXIS DATA-% scene = obj.layout.("scene" + xsource); - obj.PlotOptions.scene_anchor = ['scene' num2str(xsource)]; + obj.PlotOptions.scene_anchor = "scene" + xsource; %---------------------------------------------------------------------% @@ -314,20 +303,9 @@ function updatePie3(obj,plotIndex) %-scene to be set-% obj.PlotOptions.scene = scene; - %---------------------------------------------------------------------% - - %-surface name-% obj.data{surfaceIndex}.name = image_data.DisplayName; obj.data{surfaceIndex-1}.name = image_data.DisplayName; - - %---------------------------------------------------------------------% - - %-surface showscale-% obj.data{surfaceIndex}.showscale = false; - - %---------------------------------------------------------------------% - - %-surface visible-% obj.data{surfaceIndex}.visible = strcmp(image_data.Visible,'on'); %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateRectangle.m b/plotly/plotlyfig_aux/handlegraphics/updateRectangle.m index 86156a66..3d422d15 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateRectangle.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateRectangle.m @@ -43,8 +43,8 @@ %---------------------------------------------------------------------% %-rectangle xaxis and yaxis-% - obj.data{rectIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{rectIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{rectIndex}.xaxis = "x" + xsource; + obj.data{rectIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateScattergroup.m b/plotly/plotlyfig_aux/handlegraphics/updateScattergroup.m index 25d891db..8b713c4d 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateScattergroup.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateScattergroup.m @@ -72,8 +72,8 @@ function updateScattergroup(obj,scatterIndex) %---------------------------------------------------------------------% %-scatter xaxis and yaxis-% - obj.data{scatterIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{scatterIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{scatterIndex}.xaxis = "x" + xsource; + obj.data{scatterIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateStem.m b/plotly/plotlyfig_aux/handlegraphics/updateStem.m index 2f519c43..6ae0b6c1 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateStem.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateStem.m @@ -52,17 +52,8 @@ %---------------------------------------------------------------------% - %-scatter3d visible-% stem_data.visible = strcmp(data.Visible, "on"); - - %---------------------------------------------------------------------% - - %-scatter3d name-% stem_data.name = data.DisplayName; - - %---------------------------------------------------------------------% - - %-scatter mode-% stem_data.mode = "lines+markers"; %---------------------------------------------------------------------% @@ -109,12 +100,7 @@ %---------------------------------------------------------------------% - %-scatter3d line-% stem_data.line = extractLineLine(data); - - %---------------------------------------------------------------------% - - %-scatter3d marker-% stem_data.marker = extractLineMarker(data); %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateStreamtube.m b/plotly/plotlyfig_aux/handlegraphics/updateStreamtube.m index 34a25fd3..c7d8694e 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateStreamtube.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateStreamtube.m @@ -22,8 +22,8 @@ function updateSurfaceStreamtube(obj, surfaceIndex) %---------------------------------------------------------------------% %-surface xaxis and yaxis-% - obj.data{surfaceIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{surfaceIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{surfaceIndex}.xaxis = "x" + xsource; + obj.data{surfaceIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateSurfaceplot.m b/plotly/plotlyfig_aux/handlegraphics/updateSurfaceplot.m index 7023cb93..fc388bf0 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateSurfaceplot.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateSurfaceplot.m @@ -16,8 +16,8 @@ %---------------------------------------------------------------------% %-surface xaxis and yaxis-% - obj.data{surfaceIndex}.xaxis = ['x' num2str(xsource)]; - obj.data{surfaceIndex}.yaxis = ['y' num2str(ysource)]; + obj.data{surfaceIndex}.xaxis = "x" + xsource; + obj.data{surfaceIndex}.yaxis = "y" + ysource; %---------------------------------------------------------------------% diff --git a/plotly/plotlyfig_aux/handlegraphics/updateWordcloud.m b/plotly/plotlyfig_aux/handlegraphics/updateWordcloud.m index e6eddb09..b84fcfd5 100644 --- a/plotly/plotlyfig_aux/handlegraphics/updateWordcloud.m +++ b/plotly/plotlyfig_aux/handlegraphics/updateWordcloud.m @@ -124,12 +124,7 @@ function updateWordcloud(obj,scatterIndex) %---------------------------------------------------------------------% - %-det font family-% obj.data{scatterIndex}.textfont.family = matlab2plotlyfont(scatter_data.FontName); - - %---------------------------------------------------------------------% - - %-scatter visible-% obj.data{scatterIndex}.visible = strcmp(scatter_data.Visible,'on'); %---------------------------------------------------------------------%