How to remove artifacts in plots?
이전 댓글 표시
The following code is an example that represents my problem:
x=0:1:100;
y=zeros(size(x));
y(1:10)=10:-1:1;
y(13:2:99)=1e-15;
plot(x,y);
Unexpectedly the plot doesn't show a straight line for x values higher than 10. The plot suggests that the 'bumps' are much higher than 1e-15, since 1e-15 shouldn't be visible when using this y axis. However, if I use the Pan tool and move the line a very tiny bit upwards, then it suddenly becomes straight.
As a temporary work-around I round all y values before making plots, but I think that shouldn't be necessary.
How can I remove the artifacts without having to round the y values?
댓글 수: 2
Azzi Abdelmalek
2015년 6월 22일
I am not following you, what is exactly your problem?
Adrie
2015년 6월 22일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




