How do I plot multiple lines on the same plot?

2 次查看(过去 30 天)
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 中查找有关 Visual Exploration 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by