Thread Subject: plotyy for 3 curves

Subject: plotyy for 3 curves

From: Mehdi

Date: 25 Nov, 2009 18:42:07

Message: 1 of 2

Hello everyone:
I understand that one can use plotyy to plot two curves (usually when
they have very different order of magnitudes) on a single plot but
with different y-axis. My question is the following:
Is it possible to plot three curves using plotyy (two curves will
correspond to one y-axis and one curve corresponds to the other)?
As you know this is easy to do using excel but I found no way to do it
in MATLAB.

Thanks,
Yours,
Mehdi

Subject: plotyy for 3 curves

From: dpb

Date: 25 Nov, 2009 18:51:32

Message: 2 of 2

Mehdi wrote:
> Hello everyone:
> I understand that one can use plotyy to plot two curves (usually when
> they have very different order of magnitudes) on a single plot but
> with different y-axis. My question is the following:
> Is it possible to plot three curves using plotyy (two curves will
> correspond to one y-axis and one curve corresponds to the other)?
> As you know this is easy to do using excel but I found no way to do it
> in MATLAB.


Save the axes handles returned by plotyy() and add the additional data

I didn't try but I'd think passing a matrix for x2,y2 would do the same...

--

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

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.

rssFeed for this Thread

Contact us at files@mathworks.com