How do I plot multiple lines on the same plot?

조회 수: 3 (최근 30일)
Lian
Lian 2014년 5월 17일
댓글: Walter Roberson 2014년 5월 18일
So i have couple hundreds of lines and within each line, i have thousands of points that define the line. I have tried to use a loop and Hold to plot the lines, but the computing gets very slow, which i guess is due to the heavy use of memory to store all the lines at once. So i would like to know if there is a better way to plot them, for example don't show them at the same time, but still plotting in the same graph?
Thank you very much!
  댓글 수: 2
dpb
dpb 2014년 5월 17일
Almost certainly the "thousands of points" is more than there are pixels to display them so first look at decimating the length.
It's faster to add to the ydata array directly than to use plot
Also, put them in an array and plot the array instead of individually.
These presume you have (or can create) a consistent x
Walter Roberson
Walter Roberson 2014년 5월 18일
Are there the same number of points for every line? Are they all at the same x ?
How much zooming do you need to be doing?

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

답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by