File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
plotly/plotlyfig_aux/handlegraphics Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,6 @@ function updateLineseries(obj, plotIndex)
5151 obj.data{plotIndex }.type = ' scatterpolar' ;
5252 updateDefaultPolaraxes(obj , plotIndex )
5353 obj.data{plotIndex }.subplot = sprintf(' polar%d ' , xSource + 1 );
54-
5554 elseif ~isPlot3D
5655 obj.data{plotIndex }.type = ' scatter' ;
5756 obj.data{plotIndex }.xaxis = sprintf(' x%d ' , xSource );
@@ -73,11 +72,15 @@ function updateLineseries(obj, plotIndex)
7372 if isPolar
7473 obj.data{plotIndex }.r = rData ;
7574 obj.data{plotIndex }.theta = thetaData ;
76-
7775 else
7876 obj.data{plotIndex }.x = xData ;
7977 obj.data{plotIndex }.y = yData ;
8078
79+ if isscalar(xData ) % plotly has trouble plotting a single point
80+ obj.data{plotIndex }.x = repmat(obj.data{plotIndex }.x,[1 ,2 ]);
81+ obj.data{plotIndex }.y = repmat(obj.data{plotIndex }.y,[1 ,2 ]);
82+ end
83+
8184 if isPlot3D
8285 obj.data{plotIndex }.z = zData ;
8386 obj.PlotOptions.is3d = true ;
You can’t perform that action at this time.
0 commit comments