Figure rendered with OpenGL shows distorted data

2 次查看(过去 30 天)
Hi,
I'm running MATLAB 7.13.0.564 (R2011b)
I believe the code below illustrates a bug in the OpenGL renderer. The two plots generated contain the same data but the visual results are quite different.
t0=now;N=1e3;y=cumsum(randn(1,N));t=linspace(t0,t0+1,N);figure;plot(t,y);figure;plot(t,y);set(gcf,'renderer','opengl');
The distortion is much less severe when t0 is set to 0 instead of now.
I have a plot containing transparency which needs the OpenGL renderer but it's distorting my data. Can anyone help me with this?
Thank you!

采纳的回答

Walter Roberson
Walter Roberson 2013-1-7
Yes, setting to the OpenGL renderer has problems when the datapoints are close enough together. If you plot(1:length(y),y) you will not see the same problem. But compare
plot((1:1000)/100000000,y)
to
plot((1:1000)/1000000000,y)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graphics Performance 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by