How do I plot multiple lines on the same plot?

1 view (last 30 days)
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 Comments
dpb
dpb on 17 May 2014
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 on 18 May 2014
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?

Sign in to comment.

Answers (0)

Categories

Find more on Visual Exploration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!