Re: [R] multiple plots in a graph

2007-07-12 Thread Uwe Ligges
Ajay Singh wrote: > Hi, > I have to generate 10 cdfs in a graph. I need to compare the cdf's > nature by plotting ten cdfs in a graph. Thus, I need multiple plots in a > graph. > I would appreciate if you could give some solution to the problem asap. plot(ecdf(rnorm(10))) plot(ecdf(rnorm(

[R] multiple plots in a graph

2007-07-12 Thread Ajay Singh
Hi, I have to generate 10 cdfs in a graph. I need to compare the cdf's nature by plotting ten cdfs in a graph. Thus, I need multiple plots in a graph. I would appreciate if you could give some solution to the problem asap. Thanking you, Sincerely, Ajay. -- Ajay Singh Research Scientist, SOM,

Re: [R] Multiple plots via sapply or lapply?

2007-01-07 Thread talepanda
try apply() : par(new=F); apply(s,2,function(x){plot(x[[1]],x[[2]],type="o");par(new=T)}) On 1/8/07, Antje <[EMAIL PROTECTED]> wrote: > Hi all, > > I've got the following problem. I have a vector containing file names. I > want to read these files as csv and calculate the density-function for > e

[R] Multiple plots via sapply or lapply?

2007-01-07 Thread Antje
Hi all, I've got the following problem. I have a vector containing file names. I want to read these files as csv and calculate the density-function for each file (has just one column with data). Then, I'd like to plot all density functions into one window. I did the following to calculate the

Re: [R] multiple plots in the same graph

2006-11-04 Thread Jeff Miller
Li, What type of plot? A profile plot would be interaction.plot(factor1,factor2,y) Jeff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Li Zhang Sent: Friday, November 03, 2006 9:55 PM To: R-help@stat.math.ethz.ch Subject: [R] multiple plots in the

Re: [R] multiple plots in the same graph

2006-11-03 Thread Christos Hatzis
See ?points and ?lines for adding new groups of points or lines to an existing graph created by plot. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Li Zhang Sent: Friday, November 03, 2006 9:55 PM To: R-help@stat.math.ethz.ch Subject: [R] multiple

[R] multiple plots in the same graph

2006-11-03 Thread Li Zhang
I'd like to plot y vs x according to the third variable "group" which has three levels. I am wondering how can I put the three plots in one graph? Thank you (http://groups.yahoo.com) ___

Re: [R] multiple plots with par mfg

2006-05-24 Thread Yan Wong
On 23 May 2006, at 21:47, Romain Francois wrote: > Hi, > > An other possibility might be to use two devices and use dev.set to > go from one to another : Thanks. Actually I did try that, but there are quite a lot of points to plot, and the switching between plots slowed the whole simulation

Re: [R] multiple plots with par mfg

2006-05-23 Thread Henrik Bengtsson
saveSubplot <- function() { if (!exists("subplotPars", mode="list")) subplotPars <<- list(); p <- par(no.readonly=TRUE); mfg <- p$mfg; key <- mfg[1]*(mfg[3]-1)+mfg[2]; subplotPars[[key]] <<- p; invisible(key); } restoreSubplot <- function(mfg) { opar <- par(); if (length(mfg) =

Re: [R] multiple plots with par mfg

2006-05-23 Thread Romain Francois
Hi, An other possibility might be to use two devices and use dev.set to go from one to another : x11() # the first device (may be windows() or quartz() depending on you OS) plot(1,1, col="blue") # blue plot x11() # the second plot(1.2,1.2, col="red") # red plot points(1.1,1.1) # appears to botto

Re: [R] multiple plots with par mfg

2006-05-23 Thread Yan Wong
On 23 May 2006, at 15:57, Greg Snow wrote: > The best thing to do is to create the first plot, add everything to > the > first plot that you need to, then go on to the 2nd plot, etc. Yes, I realise that. The problem is that the data are being simulated on the fly, and I wish to display multi

Re: [R] multiple plots with par mfg

2006-05-23 Thread Greg Snow
8111 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Yan Wong Sent: Tuesday, May 23, 2006 6:05 AM To: R-help Subject: Re: [R] multiple plots with par mfg On 23 May 2006, at 12:48, Prof Brian Ripley wrote: > On Tue, 23 May 2006, Yan Wong wrote: >> if

Re: [R] multiple plots with par mfg

2006-05-23 Thread Yan Wong
On 23 May 2006, at 12:48, Prof Brian Ripley wrote: > On Tue, 23 May 2006, Yan Wong wrote: >> if not, can anyone suggest a way of appending to 2 >> separate plots on the fly. > > No, it is user error. par(mfg=) specifies where the next figure > will the drawn, and points() does not draw a figur

Re: [R] multiple plots with par mfg

2006-05-23 Thread Prof Brian Ripley
On Tue, 23 May 2006, Yan Wong wrote: > Hi, > > I'm trying to add points to 2 plots on the fly using par(mfg=vector) > so switch between them. However, the appropriate scales aren't > switched when changing from one plot to another, e.g. > > par(mfcol=c(2,1)) > plot(1,1, col="blue")# blue p

[R] multiple plots with par mfg

2006-05-23 Thread Yan Wong
Hi, I'm trying to add points to 2 plots on the fly using par(mfg=vector) so switch between them. However, the appropriate scales aren't switched when changing from one plot to another, e.g. par(mfcol=c(2,1)) plot(1,1, col="blue")# blue plot plot(1.2,1.2, col="red") # red plot poin

Re: [R] multiple plots in a function()

2006-05-21 Thread Gabor Grothendieck
sult overwrites the output of the > > previous output and is not plotted side by side as intended. > > > > What to change? > > > > Thanks a lot, Dirk > > > > Dr.med. D. Weismann > > Schwerpunkt Endokrinologie/Diabetologie > > Medizinische Kl

Re: [R] multiple plots in a function()

2006-05-21 Thread Romain Francois
Le 20.05.2006 17:33, [EMAIL PROTECTED] a écrit : > Sorry for again asking the same question, but I am still not successfull, > also after using grid-package, as recommended previously: > > I want to write a function() which generates a graphical output and can be > used in a loop to produce sever

Re: [R] multiple plots in a function()

2006-05-20 Thread Gabor Grothendieck
he Klinik und Poliklinik I > Universität Würzburg > Josef-Schneider-Str. 2 > 97080 Würzburg > email: [EMAIL PROTECTED] > Telefon: 0931/201-1 > > > > -Ursprüngliche Nachricht- > Von: Gabor Grothendieck [mailto:[EMAIL PROTECTED] > Gesendet: Mi 17.05.2006 03:

Re: [R] multiple plots in a function()

2006-05-20 Thread Weismann_D
il: [EMAIL PROTECTED] Telefon: 0931/201-1 -Ursprüngliche Nachricht- Von: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Gesendet: Mi 17.05.2006 03:19 An: Weismann, Dirk Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Betreff: Re: [R] multiple plots in a function() Use grid graphics http://www.stat.auc

Re: [R] multiple plots in a function()

2006-05-16 Thread Harald Stepputtis
Hello, I am new to R and want to use it for some statistical tests. Before the tests, I want to visualize my data with pairwise scatterplots using "pairs(myData)". To analyse it by eye, I would like to draw the function f(x)=y into each of the scatterplot panels. Unfortunately I get lost when

Re: [R] multiple plots in a function()

2006-05-15 Thread Gabor Grothendieck
You could override par by optionally passing it as an argument: f <- function(x = 1:10, y = 1:10, par = list(mfrow = c(2,2))) { if (!is.null(par)) { on.exit(par(opar)) opar <- par(par) } plot(x) plot(y) } opar <- par(mfrow=c(4,4)) fo

[R] multiple plots in a function()

2006-05-15 Thread Weismann_D
Dear all, I have the following problem: I have written a function genereating to plots, eg myfunction <- (data, some.parameters) { #some calculations etc . par (mfrow=c(1,2)) plot1(..) plot2(.) } which works fine. But for analysing several variants,

[R] Multiple plots on the same pdf file (clarification)

2006-02-24 Thread Juan Lewinger
Liaw, Andy" <[EMAIL PROTECTED]> Date: Friday, February 24, 2006 11:41 am Subject: RE: [R] Multiple plots on the same pdf file To: 'Juan Lewinger' <[EMAIL PROTECTED]>, r-help@stat.math.ethz.ch > You need to say more explicitly what `does not work' means (as the &

Re: [R] Multiple plots on the same pdf file

2006-02-24 Thread Liaw, Andy
You need to say more explicitly what `does not work' means (as the Posting Guide asks). What you've stated will generate plots in separate pages in the PDF file. If that's not what you want, then tell us exactly what you are looking for. Andy From: Juan Lewinger > > Is there a way to output mu

[R] Multiple plots on the same pdf file

2006-02-24 Thread Juan Lewinger
Is there a way to output multiple plots generated with a high level plot function such as "plot()" to the same pdf file? The following does not work (in windows XP): pdf(filename) plot(...) # first plot plot(...) # second plot . plot(...)

[R] Multiple plots on a common x-axis, different y-axes

2006-02-12 Thread Brett Gordon
Hello, I'd like to plot two functions on the same x-axis, but with two different y-axis. However, I can't seem to find the write plotting function to do this with. Any help would be greatly appreciated. Thanks, Brett [EMAIL PROTECTED] __ R-help@stat

[R] Multiple plots per page

2005-12-16 Thread Bill Hunsicker
R-help, I am trying to run a number of plots and want to generate 45 plots with 9 pages per plot. I sent an email about four hours ago, but my email has been funky, I apologize in advance if this message is duplicate. Regards, Bill Bill Hunsicker RF Micro Devices 7625 Thorndike Road Gree

Re: [R] multiple plots per page

2005-12-16 Thread Earl F. Glynn
"Bill Hunsicker" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > R-help, > > I would like to place nine (3X3) plots per page. I am not properly > implement mfrow(3,3) in the script below: Does this help? jpeg("3x3.jpg") oldpar <- par( mfcol=c(3,3) ) plot(1) plot(2) plot(3) plot(4)

[R] multiple plots per page

2005-12-16 Thread Bill Hunsicker
R-help, I would like to place nine (3X3) plots per page. I am not properly implement mfrow(3,3) in the script below: jpeg("xyplot.jpg") #names output file my_args <- commandArgs() #sets up to take args from dos batch command mfcol(3,3) #set page for 3X3 TEMPS <- c(-15,25,85)#list of temps VBATS

Re: [R] multiple plots on same x axis

2005-09-29 Thread Petr Pikal
[R] multiple plots on same x axis > Hi. > > I have two vectors of gene expression for each of > several days. I want to plot both vectors on the same > plot for a visual representation of up versus down > regulation. I've tried using add=T but that doesn't > work. &

Re: [R] multiple plots on same x axis

2005-09-27 Thread Charles Annis, P.E.
GALLAGHER Sent: Tuesday, September 27, 2005 10:35 AM To: r-help@stat.math.ethz.ch Subject: [R] multiple plots on same x axis Hi. I have two vectors of gene expression for each of several days. I want to plot both vectors on the same plot for a visual representation of up versus down regulation. I&#x

[R] multiple plots on same x axis

2005-09-27 Thread IAIN GALLAGHER
Hi. I have two vectors of gene expression for each of several days. I want to plot both vectors on the same plot for a visual representation of up versus down regulation. I've tried using add=T but that doesn't work. eg >plot(Day, gene1) >plot(Day, gene2, add=T) Any help would be appreciated.

Re: [R] multiple plots in png output

2005-08-19 Thread Francisco J. Zagmutt
L. Updegraff" <[EMAIL PROTECTED]> >To: r-help@stat.math.ethz.ch >Subject: [R] multiple plots in png output >Date: Fri, 19 Aug 2005 13:25:13 -0500 (CDT) > >I am using R version 1.9.1 under Linux. > >In the past I have had no problem saving a multi-plot page to a posts

[R] multiple plots in png output

2005-08-19 Thread Karen L. Updegraff
I am using R version 1.9.1 under Linux. In the past I have had no problem saving a multi-plot page to a postscript or png device. However, the last time I did this may have been under a previous version of R. Presently nothing I do seems to succeed in saving multi-plots, defined (for example) with

Re: [R] multiple plots

2005-06-07 Thread Chuck Cleland
How about this: myframe <- expand.grid(p1 = rnorm(10), p2 = rnorm(10), classes = paste("class", 1:10, sep=""), colors = c("blue", "red", "green", "yellow", "orange", "purple")) library(lattice) xyplot(p2 ~ p1 | classes * colors, data=myframe) If

[R] multiple plots

2005-06-07 Thread alex diaz
Hi: I am learning to use R and I am experiencing some difficulties in writing a function to produce multiple plots. This is a single plot Subset(myframe, color==”blue” & class==1) Plot(myframe$p1, myframe$p2) My problem is that I have six colors (blue, red, green,) and 10 classes, that is

re:[R] Multiple plots in one screen

2005-01-17 Thread Niels Steen Krogh
see ?par look for par(new=T) (if you want plot-overlay) or just ?lines (if you want several lines in one plot) __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] Multiple plots in one screen

2005-01-16 Thread Peter Dalgaard
Robert Weenink <[EMAIL PROTECTED]> writes: > I'm a fairly new user of R and I'm confronted with a problem to which I can't > find the solution in any R manual or FAQ. > > I'd like to plot multiple 'graphs' in one plot screen. For example, my data > frame would be: > > x a b c > 1

[R] Multiple plots in one screen

2005-01-16 Thread Robert Weenink
I'm a fairly new user of R and I'm confronted with a problem to which I can't find the solution in any R manual or FAQ. I'd like to plot multiple 'graphs' in one plot screen. For example, my data frame would be: x a b c 1111518 2261219 3221714

[R] multiple plots for data sets of inconsistent size

2004-06-18 Thread Laura Quinn
I am wanting to plot pca loadings onto sites superimposed on a contour map. There are a maximum of 20 sites at which loadings might appear - however due to the nature of my data, missing data has meant that some stations have not been included in some of the pca. For example, I am performing pca f

Re: [R] multiple plots problem

2004-04-01 Thread Duncan Murdoch
On Thu, 1 Apr 2004 17:48:11 +0400 (MSD), Oleg Bartunov <[EMAIL PROTECTED]> wrote : >On Thu, 1 Apr 2004, Duncan Murdoch wrote: >> In Windows you can record all plots by using the record=TRUE option >> when you open the graphics display, or from the menu on the display >> window. You cycle back th

RE: [R] multiple plots problem

2004-04-01 Thread Hanke, Alex
Correction: I should have wrote layout(matrix(c(1,2,3,4), 2, 2, byrow = TRUE)) Sorry Alex -Original Message- From: Hanke, Alex [mailto:[EMAIL PROTECTED] Sent: April 1, 2004 9:25 AM To: 'Oleg Bartunov'; '[EMAIL PROTECTED]' Subject: RE: [R] multiple plots problem T

Re: [R] multiple plots problem

2004-04-01 Thread Oleg Bartunov
Angel, thanks for example, but I think you don't understand me - I was looking native way to say R, please, don't erase canvas. Any emulations required additional typing (so many in R! - readline is great, but no support for prefix search as in bash)) and some attention (don't forget to type 'i<-n

Re: [R] multiple plots problem

2004-04-01 Thread Angel Lopez
Depends on what you understand by _explicitly_ specify screen number: par(bg = "white") # default is likely to be transparent screenlist<-split.screen(c(3,1))# split display into three i<-screenlist[1] # Create a function to simulate the "tabbing" nextplot<-function(i) { i<-i+1 i

Re: [R] multiple plots problem

2004-04-01 Thread Oleg Bartunov
interesting, it works, but still need to explicitly specify screen number. It'b be nice to have tabbed canvas, but I suspect it's wrong list. Oleg On Thu, 1 Apr 2004, Angel Lopez wrote: > Have you considered using > ?split.screen > and > ?erase.screen > with a non-transparent background >

Re: [R] multiple plots problem

2004-04-01 Thread Angel Lopez
Have you considered using ?split.screen and ?erase.screen with a non-transparent background instead of layout. Example: par(bg = "white") # default is likely to be transparent split.screen(c(3,1))# split display into three screens screen(1) plot(1:10) screen(2) plot(2:20) screen(3

RE: [R] multiple plots problem

2004-04-01 Thread Hanke, Alex
The command: layout(c(1,2,3), 3, 1) specifies 3 plots Try layout(1:4,2,2,byrow=T) Regards, Alex -Original Message- From: Oleg Bartunov [mailto:[EMAIL PROTECTED] Sent: April 1, 2004 7:39 AM To: R-help Subject: [R] multiple plots problem Hello, for testing & learning purposes I cr

Re: [R] multiple plots problem

2004-04-01 Thread Oleg Bartunov
On Thu, 1 Apr 2004, Duncan Murdoch wrote: > On Thu, 1 Apr 2004 15:38:54 +0400 (MSD), Oleg Bartunov > <[EMAIL PROTECTED]> wrote : > > >Hello, > > > >for testing & learning purposes I create X11 device and specify layout like > >layout(c(1,2,3), 3, 1), so I could play with parameters and see > >seve

Re: [R] multiple plots problem

2004-04-01 Thread Oleg Bartunov
On Thu, 1 Apr 2004, Philipp Pagel wrote: > > > for testing & learning purposes I create X11 device and specify layout like > > layout(c(1,2,3), 3, 1), so I could play with parameters and see > > several plots at the same time. That works fine until I try to create 4-th > > plot - all other plots e

Re: [R] multiple plots problem

2004-04-01 Thread Duncan Murdoch
On Thu, 1 Apr 2004 15:38:54 +0400 (MSD), Oleg Bartunov <[EMAIL PROTECTED]> wrote : >Hello, > >for testing & learning purposes I create X11 device and specify layout like >layout(c(1,2,3), 3, 1), so I could play with parameters and see >several plots at the same time. That works fine until I try to

Re: [R] multiple plots problem

2004-04-01 Thread Philipp Pagel
> for testing & learning purposes I create X11 device and specify layout like > layout(c(1,2,3), 3, 1), so I could play with parameters and see > several plots at the same time. That works fine until I try to create 4-th > plot - all other plots erased. That's expected behaviour: you aske

[R] multiple plots problem

2004-04-01 Thread Oleg Bartunov
Hello, for testing & learning purposes I create X11 device and specify layout like layout(c(1,2,3), 3, 1), so I could play with parameters and see several plots at the same time. That works fine until I try to create 4-th plot - all other plots erased. Such behaviour isn't desirable for testing pu

Re: [R] multiple plots in different windows

2004-02-06 Thread Bernardo Rangel Tura
At 14:29 05-02-2004, you wrote: >Hi all, >I'd like to generate a number of plots to compare different >vectors I have stored in a list. To do this I do something like >(in a linux system): > >for(i in 1:L) { > X11() > plot(listOfFunctions[[i]]) >} > >First question is: is this the right way to cre

[R] multiple plots in different windows

2004-02-05 Thread Giampiero Salvi
Hi all, I'd like to generate a number of plots to compare different vectors I have stored in a list. To do this I do something like (in a linux system): for(i in 1:L) { X11() plot(listOfFunctions[[i]]) } First question is: is this the right way to create several plots (in different windows) ? S

RE: [R] multiple plots..again

2004-01-28 Thread Andy Bunn
Have you tried layout? layout(matrix(1:10, 5, 2, byrow = TRUE)) for(i in 1:10){ plot(rnorm(100), type = "l", col = "red", main = paste("Your Variable Number", i, sep = " ")) lines(runif(100), col = "blue") } Does this get you started? -A __ [E

[R] multiple plots..again

2004-01-28 Thread Simon Melov
Hi, I realize many posts have been written about this, but I have gone through the archives and cannot find an example/solution particular to my problem. I have two Df's as follows Df-1 Time V1 V2 V3...V100 9 0.5 1.8 -0.3 .. 14 2 -0.4 0.003.. 19 -4 3 0.1.. Df-2 is the same but has different val

Re: [R] Multiple plots?

2003-10-10 Thread Roger D. Peng
Look at ?points. And you can set col = for most plotting functions. -roger Matthew Fero wrote: Here's a beginner question: How do I plot two different sets of points simultaneously, e.g. (Xapples, Yapples) and (Xoranges, Yoranges), preferably in different colors? Matthew _

[R] Multiple plots?

2003-10-10 Thread Matthew Fero
Here's a beginner question: How do I plot two different sets of points simultaneously, e.g. (Xapples, Yapples) and (Xoranges, Yoranges), preferably in different colors? Matthew __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/l

Re: [R] Multiple plots on same graph

2003-07-05 Thread Prof Brian Ripley
On Sat, 5 Jul 2003, Paul, David A wrote: > R1.7, Win2k: > > I have some Splus code that has allowed me, in the past, > to place multiple plots on the same graph: > > > plot(y1 ~ x1, data = foo1.frame, type = "l", xlab="",ylab="", > xlim=c(...,...), ylim=c(...,...), axes=F) > par(new=T, x

[R] Multiple plots on same graph

2003-07-05 Thread Paul, David A
R1.7, Win2k: I have some Splus code that has allowed me, in the past, to place multiple plots on the same graph: plot(y1 ~ x1, data = foo1.frame, type = "l", xlab="",ylab="", xlim=c(...,...), ylim=c(...,...), axes=F) par(new=T, xaxs = "d", yaxs = "d") plot(y2 ~ x2, data = foo2.frame, col =

Re: [R] multiple plots...

2003-03-14 Thread ripley
On Fri, 14 Mar 2003, Vasudevan, Geetha wrote: > Is it possible to display multiple plots in different windows rather than using the > split.screen ? > thanks. Yes. Just open a new device with windows() (since your message was in a proprietary MS character set) before each plot. -- Brian D. R

[R] multiple plots...

2003-03-14 Thread Vasudevan, Geetha
Is it possible to display multiple plots in different windows rather than using the split.screen ? thanks. -Geetha. __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Re: [R] multiple plots and postscript()

2003-03-11 Thread Robin Hankin
Many thanks to everyone who helped me with resizing my subplots. The problem was that setting par(mfrow=c(2,2)) does not rescale the fonts, which are set to be the right size for A4 paper. What I didn't realize was that resizing the fonts also resizes the positions of axis labels and titles, maki

Re: [R] multiple plots and postscript()

2003-03-06 Thread Chong Gu
You may try something like this: postscript(file="fig.ps",height=4,width=4) layout(matrix(c(0,1,2,0,3,4),2,3,byrow=TRUE),c(0,1,1),c(1,1)) par(mar=c(5,5,2,2)+.1,mex=.6) The default spacings are different for 2x3 and 2x2. The layout facility allows one to cheat it out. Good luck. Chong Gu > K

Re: [R] multiple plots and postscript()

2003-03-06 Thread ripley
On Fri, 7 Mar 2003, Robin Hankin wrote: > Kia Ora everybody. > > There must be an obvious answer to this, but I can't see it > > I want four square plots in one postscript file. The canonical answer > would be: > > postscript(file="~/f.ps",width=5,height=5) > par(pty="s",mfrow=c(2,2)) > pl

[R] multiple plots and postscript()

2003-03-06 Thread Robin Hankin
Kia Ora everybody. There must be an obvious answer to this, but I can't see it I want four square plots in one postscript file. The canonical answer would be: postscript(file="~/f.ps",width=5,height=5) par(pty="s",mfrow=c(2,2)) plot(1:19,xlab="") plot(1:19,xlab="") plot(1:19,xlab="") plot(1