Why is scatter slow to pan and zoom

5 次查看(过去 30 天)
Hello, I'm using R2017 and am using numerous plot functions. I've just found that "scatter" seems to really limit how quickly I can navigate around on a plot. It doesn't seem to be my particular plot; it seems to be related to "scatter" only.
Example - compare panning a line plot and scatter plot (or zooming with the mouse wheel):
figure;
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);
scatter(x,y);
title( 'Scatter' );
pan on
figure;
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y);
title( 'Line' );
pan on
figure;
plot(x,y);
hold on
s = scatter(0,0,100,'>');
s.LineWidth = 2;
s = scatter(pi/2,1,100,'h');
s.LineWidth = 2;
s = scatter(pi,0,100,'+');
s.LineWidth = 2;
s = scatter(3*pi/2,-1,100,'^');
s.LineWidth = 2;
s = scatter(2*pi,0,100,'*');
s.LineWidth = 2;
title( 'Line & scatter' );
pan on
I'm only using scatter for 5-30 points, each with a different marker (new call to "scatter"). It gets progressively worse past 5 or 10 points. But it only takes 1 to significantly slow down pan/zoom update rates.
Any suggestions?
Thanks!
- John
  1 个评论
Matt J
Matt J 2017-3-24
Hmmm. I'm not seeing any noticeably slow behavior. I would expect scatter to be slower on some time scale because you have more graphics objects in that plot, but it's not perceptible to me when manually panning/zooming.
A complete reboot of the computer might be something to try.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Scatter Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by