How to put more than 200000 line segments on a plot?

조회 수: 1 (최근 30일)
Mr M.
Mr M. 2018년 2월 14일
댓글: Jan 2018년 2월 14일
I realized that MATLAB cannot handle more than 200000 line segments. Is it possible to do somehow?
  댓글 수: 1
Jan
Jan 2018년 2월 14일
Please explain the details. If you realize this, mention the reason of your assumption. Post some code, which reproduces, what you observe.

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

답변 (1개)

Jonathan Chin
Jonathan Chin 2018년 2월 14일
Not sure what you mean by cannot handle more than 200000 line segments. I was able to plot them using matlab 2017b and matlab 2012 using the following code to generate the line segments.
X=rand(2,200000);
Y=rand(2,200000);
plot(X,Y)
However you if you you just want to see the lines you can place nans between each line segment This might improve performance for you.
X=rand(2,10);
Y=rand(2,10);
subplot(211)
plot(X,Y)
X(3,:)=NaN;
Y(3,:)=NaN;
subplot(212)
plot(X(:),Y(:))
I used 10 line segments just to make it easier to compare results

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by