Thread Subject: question: plot different dataset on a same plot

Subject: question: plot different dataset on a same plot

From: Bronsing

Date: 15 Jul, 2003 13:41:39

Message: 1 of 4



Sean Yang <yang22@purdue.edu> wrote in message
news:bevtrp$gj8$1@mozo.cc.purdue.edu...
> Hi, I want to plot two dataset on a same plot, i.e, not
subplot(2,1,1)...subplot(2,1,2)
> But the two datasets are with different range, A is (1,100) ,B is (0.001,
0.1).
> If I simply "hold on" and plot one by one, data in B are barely visible.
How to solve that problem?
> Thanks a lot.
>
>

Use Plotyy(t,A,t,B).

type
help plotyy
for more info


--

Robert Bronsing

Can't you see?
It all makes perfect sense,
expressed in dollars and cents, pounds, shillings and pence

(R. Waters)

Subject: question: plot different dataset on a same plot

From: Sean Yang

Date: 15 Jul, 2003 09:53:16

Message: 2 of 4

It works. thanks a lot.

"Bronsing" <r.bronsing@NOSPAMerasmusmc.nl> wrote in message news:bf0paf$qqo$1@mrelay2.eur.nl...
>
>
> Sean Yang <yang22@purdue.edu> wrote in message
> news:bevtrp$gj8$1@mozo.cc.purdue.edu...
> > Hi, I want to plot two dataset on a same plot, i.e, not
> subplot(2,1,1)...subplot(2,1,2)
> > But the two datasets are with different range, A is (1,100) ,B is (0.001,
> 0.1).
> > If I simply "hold on" and plot one by one, data in B are barely visible.
> How to solve that problem?
> > Thanks a lot.
> >
> >
>
> Use Plotyy(t,A,t,B).
>
> type
> help plotyy
> for more info
>
>
> --
>
> Robert Bronsing
>
> Can't you see?
> It all makes perfect sense,
> expressed in dollars and cents, pounds, shillings and pence
>
> (R. Waters)
>
>
>

Subject: question: plot different dataset on a same plot

From: Sean Yang

Date: 14 Jul, 2003 22:53:58

Message: 3 of 4

Hi, I want to plot two dataset on a same plot, i.e, not subplot(2,1,1)...subplot(2,1,2)
But the two datasets are with different range, A is (1,100) ,B is (0.001, 0.1).
If I simply "hold on" and plot one by one, data in B are barely visible. How to solve that problem?
Thanks a lot.

Subject: question: plot different dataset on a same plot

From: Cole Stephens

Date: 18 Jul, 2003 23:14:27

Message: 4 of 4


"Sean Yang" <yang22@purdue.edu> wrote in message
news:bevtrp$gj8$1@mozo.cc.purdue.edu...
> Hi, I want to plot two dataset on a same plot, i.e, not
subplot(2,1,1)...subplot(2,1,2)
> But the two datasets are with different range, A is (1,100) ,B is (0.001,
0.1).
> If I simply "hold on" and plot one by one, data in B are barely visible.
How to solve that problem?
> Thanks a lot.
>
>

From the MATLAB Help:

The XAxisLocation and YAxisLocation properties specify on which side of the
graph to place the x- and y-axes. You can create graphs with two different
x-axes and y-axes by superimposing two axes objects and using XAxisLocation
and YAxisLocation to position each axis on a different side of the graph.
This technique is useful to plot different sets of data with different
scaling in the same graph.

Look up "Using Multiple X and Y Axes" in the online help & it'll give you an
example.

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