Re: [R] two graphs 1 x-axis

2009-10-16 Thread Felipe Carrillo
. Carrillo Supervisory Fishery Biologist Department of the Interior US Fish & Wildlife Service California, USA --- On Fri, 10/16/09, Duijvesteijn, Naomi wrote: > From: Duijvesteijn, Naomi > Subject: [R] two graphs 1 x-axis > To: "r-help@r-project.org" > Date: Friday,

Re: [R] two graphs 1 x-axis

2009-10-16 Thread Paul Hiemstra
Hi Naomi, Take a look at the lattice package for plotting. An example using your data: library(lattice) library(reshape) a<-c(1,2,3,4,5,6) b<-c(3,5,4,6,1,1) c<-c(1,1,1,1,1,1) bla = data.frame(a,b,c) # melt is from reshape bla2 = melt(bla, id.vars = "a") xyplot(value~a | variable, bla2, layout

Re: [R] two graphs 1 x-axis

2009-10-16 Thread Philipp Pagel
On Fri, Oct 16, 2009 at 12:22:06PM +0200, Duijvesteijn, Naomi wrote: > I have a question concerning plotting graphs. > Here an example dataset > > > a<-c(1,2,3,4,5,6) > b<-c(3,5,4,6,1,1) > c<-c(1,1,1,1,1,1) > d<-as.data.frame(cbind(a,b,c)) > plot.new() > plot(d$a, d$b, col="red") > par(new=TRUE)

Re: [R] two graphs 1 x-axis

2009-10-16 Thread Jim Lemon
On 10/16/2009 09:22 PM, Duijvesteijn, Naomi wrote: Dear R-people I have a question concerning plotting graphs. Here an example dataset a<-c(1,2,3,4,5,6) b<-c(3,5,4,6,1,1) c<-c(1,1,1,1,1,1) d<-as.data.frame(cbind(a,b,c)) plot.new() plot(d$a, d$b, col="red") par(new=TRUE) plot(d$a,d$c, col="red"

[R] two graphs 1 x-axis

2009-10-16 Thread Duijvesteijn, Naomi
Dear R-people I have a question concerning plotting graphs. Here an example dataset a<-c(1,2,3,4,5,6) b<-c(3,5,4,6,1,1) c<-c(1,1,1,1,1,1) d<-as.data.frame(cbind(a,b,c)) plot.new() plot(d$a, d$b, col="red") par(new=TRUE) plot(d$a,d$c, col="red", pch="|") What I would want is to plot de second p

[R] Two graphs on one using barchart

2008-04-28 Thread Spilak,Jacqueline [Edm]
> Hi R users > Here is an example of my data (only a small part) > > Year Season A_Time R_Time O_Time All_Time AandR_Time > A_number R_numberO_numberAandR_numberall_number > 1999 Winter 9.590741 35.312963 42.759524 23.228431 18.164815 > 189

Re: [R] two graphs in one figure?

2008-04-14 Thread Greg Snow
Link [mailto:[EMAIL PROTECTED] Sent: Saturday, April 12, 2008 2:07 PM To: Greg Snow Cc: r-help@r-project.org Subject: Re: [R] two graphs in one figure? Dear Greg, thank you again for your help. The graph looks

Re: [R] two graphs in one figure?

2008-04-12 Thread Anne-Katrin Link
s to look much more like the barplot? From: Anne-Katrin Link [mailto:[EMAIL PROTECTED] Sent: Sat 4/12/2008 7:11 AM To: Greg Snow Cc: r-help@r-project.org Subject: RE: [R] two graphs in one figure? Dear Greg, dear all, thank you for your reply! To clarify, here is an example

Re: [R] two graphs in one figure?

2008-04-12 Thread Greg Snow
od enough? or do you need the bars to look much more like the barplot? From: Anne-Katrin Link [mailto:[EMAIL PROTECTED] Sent: Sat 4/12/2008 7:11 AM To: Greg Snow Cc: r-help@r-project.org Subject: RE: [R] two graphs in one figure? Dear Greg, dear all, thank yo

Re: [R] two graphs in one figure?

2008-04-12 Thread Anne-Katrin Link
dd lines to an existing plot using the lines function.  If you give more detail of what you want (examples of x, y, and ynew) then we may be able to give more help. From: [EMAIL PROTECTED] on behalf of Anne-Katrin Link Sent: Thu 4/10/2008 7:18 AM To: R Help Su

Re: [R] two graphs in one figure?

2008-04-11 Thread Jim Lemon
Anne-Katrin Link wrote: > Dear all, > > how can I plot a line graph and a bar graph in one single figure? I tried > to combine "barplot" and "plot". Even though they both have the same > x-values (1 to 55), it just doesnt look as if they match in their scale > (the barplot is much wider than t

Re: [R] two graphs in one figure?

2008-04-10 Thread Greg Snow
(examples of x, y, and ynew) then we may be able to give more help. From: [EMAIL PROTECTED] on behalf of Anne-Katrin Link Sent: Thu 4/10/2008 7:18 AM To: R Help Subject: [R] two graphs in one figure? Dear all, how can I plot a line graph and a bar graph in one

Re: [R] two graphs in one figure?

2008-04-10 Thread hadley wickham
On Thu, Apr 10, 2008 at 8:36 AM, ONKELINX, Thierry <[EMAIL PROTECTED]> wrote: > Dear Anne-Katrin, > > You could use ggplot to do this. The example below works, although it > generates some warnings. > > library(ggplot2) > dataset <- data.frame(x = 0:55, y = rnorm(56, 10), z = runif(56, 9, 11))

Re: [R] two graphs in one figure?

2008-04-10 Thread ONKELINX, Thierry
AIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Anne-Katrin Link Verzonden: donderdag 10 april 2008 15:18 Aan: R Help Onderwerp: [R] two graphs in one figure? Dear all, how can I plot a line graph and a bar graph in one single figure? I tried to combine "barplot" and "plot". Ev

[R] two graphs in one figure?

2008-04-10 Thread Anne-Katrin Link
Dear all, how can I plot a line graph and a bar graph in one single figure? I tried to combine "barplot" and "plot". Even though they both have the same x-values (1 to 55),  it just doesnt look as if they match in their scale (the barplot is much wider than the "plot"even though I tried to

Re: [R] two graphs

2008-01-07 Thread John Kane
?par and have a look at mfrow par() controls a vast amount of plotting options for regular graphics Example aa <- rnorm(100, 25, 4) bb <- aa/2 par(mfrow=c(2,1)) hist(aa) plot(bb) --- Georg Ehret <[EMAIL PROTECTED]> wrote: > Dear R community, > I am plotting a histogram and would wish to

Re: [R] two graphs

2008-01-07 Thread Weidong Gu
t Sent: Monday, January 07, 2008 4:06 PM To: r-help Subject: [R] two graphs Dear R community, I am plotting a histogram and would wish to display another variable of the same dataset in a very narrow heatmap just below the x-axis. Never mind the specifics of my task: How can I draw a secon

Re: [R] two graphs

2008-01-07 Thread Benilton Carvalho
?layout check: example(layout) to see its features. b On Jan 7, 2008, at 5:06 PM, Georg Ehret wrote: Dear R community, I am plotting a histogram and would wish to display another variable of the same dataset in a very narrow heatmap just below the x-axis. Never mind the specifics of m

[R] two graphs

2008-01-07 Thread Georg Ehret
Dear R community, I am plotting a histogram and would wish to display another variable of the same dataset in a very narrow heatmap just below the x-axis. Never mind the specifics of my task: How can I draw a second graph/image just below a first graph/image? Thank you! Georg. ***