How to prevent small lines from disappearing on zoom out?

조회 수: 1 (최근 30일)
Chuck37
Chuck37 2019년 1월 16일
댓글: Walter Roberson 2019년 1월 17일
I have a 2D curve that I am plotting as very small segments so I can change the color per segment. I have found that if I zoom out, the entire thing just disappears, perhaps due to some graphics optimization that considers each segment to be excessively small? Is there a way around this?
EDIT: For example:
for ii=0:1000
plot([0 0],[ii*0.01 ii*0.01+0.01],'linewidth',3)
hold on
end
Then,
axis([-100 100 -100 100])
At this point I have a blank plot.
  댓글 수: 3
Chuck37
Chuck37 2019년 1월 16일
See code above. Not worth posting a blank axis.
Image Analyst
Image Analyst 2019년 1월 16일
Possibly just being subsampled away when it displays on your screen in much fewer number of pixels?

댓글을 달려면 로그인하십시오.

답변 (1개)

madhan ravi
madhan ravi 2019년 1월 17일
Becuase you plot single points in every iteration and you haven‘t mentioned a marker for it
plot(...,'-ok','Linewidth',3)
% remove axis(...)
  댓글 수: 2
Chuck37
Chuck37 2019년 1월 17일
It's not single points, it's very short lines. The reason I'm doing it (not shown in example above) is to color each segment a custom color. If I switch to points, they lay on top of each other annoyingly. I started there and went to this solution instead. Of course, this is failing for a different reason.
Walter Roberson
Walter Roberson 2019년 1월 17일
Look in the File Exchange for the colored line contribution based on surf or the one based on patch.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Objects에 대해 자세히 알아보기

태그

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by