Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
legend for many signals

Subject: legend for many signals

From: Lola

Date: 11 Jan, 2011 17:06:05

Message: 1 of 8

I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?

Subject: legend for many signals

From: Sean de

Date: 11 Jan, 2011 18:01:05

Message: 2 of 8

"Lola" wrote in message <igi2ls$pvh$1@fred.mathworks.com>...
> I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?

help legend
help plot

300 is a lot though...

Subject: legend for many signals

From: Lola

Date: 11 Jan, 2011 18:20:20

Message: 3 of 8

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <igi5t0$n5n$1@fred.mathworks.com>...
> "Lola" wrote in message <igi2ls$pvh$1@fred.mathworks.com>...
> > I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?
>
> help legend
> help plot
>
> 300 is a lot though...

that is exactly the catch. 300 is a lot.
Can u give me a piece of code that is able to distinguish between 300 signals in a plot?

Subject: legend for many signals

From: Sean de

Date: 11 Jan, 2011 18:38:04

Message: 4 of 8

"Lola" wrote in message <igi714$65j$1@fred.mathworks.com>...
> "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <igi5t0$n5n$1@fred.mathworks.com>...
> > "Lola" wrote in message <igi2ls$pvh$1@fred.mathworks.com>...
> > > I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?
> >
> > help legend
> > help plot
> >
> > 300 is a lot though...
>
> that is exactly the catch. 300 is a lot.
> Can u give me a piece of code that is able to distinguish between 300 signals in a plot?

No.
I would probably use an image, with each row being one of the signals. The image would be a 300xn matrix.

But then again, I would probably spend a little while trying find a better way to approach the problem.

Subject: legend for many signals

From: Lola

Date: 11 Jan, 2011 19:16:04

Message: 5 of 8

Why would I use an image?!

Anybody else? Other ideas?

"Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <igi82c$d8i$1@fred.mathworks.com>...
> "Lola" wrote in message <igi714$65j$1@fred.mathworks.com>...
> > "Sean de " <sean.dewolski@nospamplease.umit.maine.edu> wrote in message <igi5t0$n5n$1@fred.mathworks.com>...
> > > "Lola" wrote in message <igi2ls$pvh$1@fred.mathworks.com>...
> > > > I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?
> > >
> > > help legend
> > > help plot
> > >
> > > 300 is a lot though...
> >
> > that is exactly the catch. 300 is a lot.
> > Can u give me a piece of code that is able to distinguish between 300 signals in a plot?
>
> No.
> I would probably use an image, with each row being one of the signals. The image would be a 300xn matrix.
>
> But then again, I would probably spend a little while trying find a better way to approach the problem.

Subject: legend for many signals

From: TideMan

Date: 11 Jan, 2011 19:35:30

Message: 6 of 8

On Jan 12, 8:16 am, "Lola " <amcucule...@gmail.com> wrote:
> Why would I use an image?!
>
> Anybody else? Other ideas?
>
> "Sean de " <sean.dewol...@nospamplease.umit.maine.edu> wrote in message <igi82c$d8...@fred.mathworks.com>...
>
> > "Lola" wrote in message <igi714$65...@fred.mathworks.com>...
> > > "Sean de " <sean.dewol...@nospamplease.umit.maine.edu> wrote in message <igi5t0$n5...@fred.mathworks.com>...
> > > > "Lola" wrote in message <igi2ls$pv...@fred.mathworks.com>...
> > > > > I plot 300 signals to compare their shapes. I would like to know which is which. Any idea ?
>
> > > > help legend
> > > > help plot
>
> > > > 300 is a lot though...
>
> > > that is exactly the catch. 300 is a lot.
> > > Can u give me a piece of code that is able to distinguish between 300 signals in a plot?
>
> > No.
> > I would probably use an image, with each row being one of the signals.  The image would be a 300xn matrix.  
>
> > But then again, I would probably spend a little while trying find a better way to approach the problem.

Do not top post.
It makes the thread hard to follow.
Put your reply UNDERNEATH.

Trying to distinguish between 300 signals in a single plot is plain
silly.
I agree with Sean de: find a better way to do it.

Subject: legend for many signals

From: Sean de

Date: 11 Jan, 2011 19:49:07

Message: 7 of 8

"Lola" wrote in message <igia9k$776$1@fred.mathworks.com>...
> Why would I use an image?!
>
> Anybody else? Other ideas?
>
> > I would probably use an image, with each row being one of the signals. The image would be a 300xn matrix.
> >
> > But then again, I would probably spend a little while trying find a better way to approach the problem.

Perhaps I wasn't clear enough. I'm not recommending you save it as an image, I'm recommending that you view it as an image. This would mean you'd be looking at a 300xn image where n is the number of samples in your signal. Since you're clearly looking for something in these signals this would allow you to find it quickly and to know exactly which signal it is. Say you wanted the highest peaks: the row with the brightest pixels contains that, or the lowest peaks the darkest parts, or the most like a sine wave, well that would be the row that goes back and forth steadily. Etc.

It's really the same thing as looking at a plot, just each signal has it's own row and the variations are changes in color/brightness not spatial dimension.

Subject: legend for many signals

From: Adrian Cherry

Date: 13 Jan, 2011 14:33:05

Message: 8 of 8

"Lola" wrote in message <igia9k$776$1@fred.mathworks.com>...
> Why would I use an image?!
>
> Anybody else? Other ideas?

It depends on what are you trying to identify in the signals, whether you just want to compare them or look for errant traces.

You could create a 3D mesh with the different signals on the z-axis.

Alternatively search MATLAB central for.

linelabel - click on a signal and it will get labelled
clickableLegend - click on a legend trace to toggle the signal visibility.
gridLegend - produces a multicolumn legend so you could have 12 columns of 25 traces. (declaration of interest - I'm the author of this one).

Combine all 3 and you might be able to analyse the traces as required.

Regards

Adrian

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us