필터 지우기
필터 지우기

Figure rendered with OpenGL shows distorted data

조회 수: 2 (최근 30일)
Matt Raum
Matt Raum 2013년 1월 7일
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