Figure rendered with OpenGL shows distorted data

2 visualizaciones (últimos 30 días)
Matt Raum
Matt Raum el 7 de En. de 2013
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!

Respuesta aceptada

Walter Roberson
Walter Roberson el 7 de En. de 2013
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)

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by