[R] plotting multiple plot in same graph

2012-04-10 Thread arunkumar1111
Hi 

I have four sets of datas

x1, x2, x3,y

I want to sactter plot between (x1,y) and line chart between  (x2 ,y) and
(x3,y)

all these should come in a single graph

Can anyone help

-
Thanks in Advance
Arun
--
View this message in context: 
http://r.789695.n4.nabble.com/plotting-multiple-plot-in-same-graph-tp4545624p4545624.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotting multiple plot in same graph

2012-04-10 Thread Jessica Streicher
Hello Arunkamar!

Basically:

plot(x1,y)
lines(x2,y)
lines(x3,y)

You might need to adjust the first plot so all data is shown. For that you 
could use something like
plot(c(min(x),max(x)) , c(min(y),max(y)),type=n)
x is all data from x1,x2,x3. type=n says that these points won't be shown in 
the plot.
This should ensure all data lies within the plot.

Then you would continue with 
points(x1,y)
lines(x2,y)
lines(x3,y)

-- without guarantees, i'm new too --

greetings
Jessi

Am 10.04.2012 um 15:33 schrieb arunkumar:

 Hi 
 
 I have four sets of datas
 
 x1, x2, x3,y
 
 I want to sactter plot between (x1,y) and line chart between  (x2 ,y) and
 (x3,y)
 
 all these should come in a single graph
 
 Can anyone help
 
 -
 Thanks in Advance
Arun
 --
 View this message in context: 
 http://r.789695.n4.nabble.com/plotting-multiple-plot-in-same-graph-tp4545624p4545624.html
 Sent from the R help mailing list archive at Nabble.com.
 
 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] plotting multiple plot in same graph

2012-04-10 Thread R. Michael Weylandt
A slightly easier formulation of the second proposal from Jessica:

plot(c(0,0) , xlim = range(x1, x2, x3), ylim = range(y), type = n)

will set the canvas correctly.

On Tue, Apr 10, 2012 at 10:10 AM, Jessica Streicher
j.streic...@micromata.de wrote:
 Hello Arunkamar!

 Basically:

 plot(x1,y)
 lines(x2,y)
 lines(x3,y)

 You might need to adjust the first plot so all data is shown. For that you 
 could use something like
 plot(c(min(x),max(x)) , c(min(y),max(y)),type=n)
 x is all data from x1,x2,x3. type=n says that these points won't be shown 
 in the plot.
 This should ensure all data lies within the plot.

 Then you would continue with
 points(x1,y)
 lines(x2,y)
 lines(x3,y)

 -- without guarantees, i'm new too --

 greetings
 Jessi

 Am 10.04.2012 um 15:33 schrieb arunkumar:

 Hi

 I have four sets of datas

 x1, x2, x3,y

 I want to sactter plot between (x1,y) and line chart between  (x2 ,y) and
 (x3,y)

 all these should come in a single graph

 Can anyone help

 -
 Thanks in Advance
        Arun
 --
 View this message in context: 
 http://r.789695.n4.nabble.com/plotting-multiple-plot-in-same-graph-tp4545624p4545624.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.