plotly_matlab icon indicating copy to clipboard operation
plotly_matlab copied to clipboard

scatter with one point does not show in offline plots

Open alexfun opened this issue 10 years ago • 2 comments

In Matlab 2015b:

scatter(1, 1)
p = fig2plotly(gcf, 'offline', true, 'strip', false)
p.data{1}.x = [p.data{1}.x, p.data{1}.x]
p.data{1}.y = [p.data{1}.x, p.data{1}.y]
p.plotly

The first plot does not show any data points. Duplicating the data point, then calling p.plotly again forces the point to show.

alexfun avatar Mar 24 '16 01:03 alexfun

Actually it seems like the offline conversion of a scatter plot in matlab just does not show the first point in the scatter plot.

alexfun avatar Mar 24 '16 02:03 alexfun

This problem persists even when plot is used:

plot(1, 1, 'v')
p = fig2plotly(gcf, 'offline', true, 'strip', false)

alexfun avatar Mar 31 '16 00:03 alexfun