Re: [R] multiple graphs on one plot

2019-05-14 Thread Andrew Halford
Hi Jim, Many thanks for your help and yes CW is carapace width. Here is the final coding I used...I set the peak of the curves at max frequency bin for each sex. I also added the means and SD's from my data. According to my visual diagnostics (qqplots, density plots) the frequency distributions

Re: [R] multiple graphs on one plot

2019-05-13 Thread Jim Lemon
Hi Andrew, First, a little mind reading. My crystal ball says that "cw" can be interpreted as "carapace width". It didn't tell me the parameters of the distribution, so: set.seed(1234) mf<-list(rnorm(400,145,15),rnorm(400,160,15)) library(plotrix) multhist(mf, xlab="CW", ylab="Frequency",

[R] multiple graphs on one plot

2019-05-12 Thread Andrew Halford
Hi Listers I've been trying to make a single graphic that has frequency histograms for male and female mud crabs displayed side by side (such as when using the beside=TRUE command for barplots). I then want to display a normal distribution on top of the male and female histograms. I have been

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-08 Thread Jim Lemon
Hi Rosa, As you are using base graphics, here is an example that might be of use. As we don't have access to your data, I have used something similar to the toy data in the example for the panes function. This could be done better using the split.screen function, so let me know if you would like

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-08 Thread Rosa Oliveira
Dear Jim, first of all, thank you very much :) can you please explain me how to use split.screen? I’m felling so silly, I could not run your example because of x11(width=10,height=4). I already installed package XQuartz because X11 library was missing , nonetheless, after I have installed

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-08 Thread Rosa Oliveira
Dear Jim, first of all, thank you very much :) can you please explain me how to use split.screen? I attach my previous graphs and my data, so you can see :) I’m very naive and new in R :( I really tried: library(plotrix) # start a wide plotting device x11(width=10,height=4)

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-08 Thread Rosa Oliveira
Dear Jim, first of all, thank you very much :) when I run the code: myDF - rbind(mse.alpha1, mse.alpha2) # assumes both data frames have the same variables in the same order myDF$ID - factor(rep(c(alpha1, alpha2), times = c(nrow(mse.alpha1), nrow(mse.alpha2))) ) library(reshape2)

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-08 Thread John Kane
. There is no real guarantee that I will read in a data file the same way as you have. John Kane Kingston ON Canada -Original Message- From: rosit...@gmail.com Sent: Wed, 8 Jul 2015 13:11:34 +0100 To: djmu...@gmail.com, drjimle...@gmail.com, r-help@r-project.org Subject: Re: [R] multiple graphs

[R] multiple graphs with a single legend and trellis graph

2015-07-07 Thread Rosa Oliveira
Iam trying to plot 6 graphs in one single plot and I was able to, nonetheless I wanted that all graphs had just 1 common legend, as the legend is the same for all the 6 graphs and there is no sense in repeating it 6 times and even more, the legends in each graph sometimes don’t fit the graph.

Re: [R] multiple graphs with a single legend and trellis graph

2015-07-07 Thread David Winsemius
On Jul 7, 2015, at 2:45 PM, Rosa Oliveira wrote: Iam trying to plot 6 graphs in one single plot and I was able to, nonetheless I wanted that all graphs had just 1 common legend, as the legend is the same for all the 6 graphs and there is no sense in repeating it 6 times and even more, the

[R] multiple graphs, lapply and different titles

2012-10-19 Thread Flavio Barros
I have a list of data.frames, and i want to iterate over this list and generate graphs with the same title of the data.frame. I did the graphs with: lapply(anual, function(x) plot(x[,'chuva'], type='l', xlab= 'anos', ylab = 'Precicipatação(mm)', col='red')) where anual is list of data.frames. I

Re: [R] multiple graphs, lapply and different titles

2012-10-19 Thread David Winsemius
On Oct 19, 2012, at 12:30 PM, Flavio Barros wrote: I have a list of data.frames, and i want to iterate over this list and generate graphs with the same title of the data.frame. I did the graphs with: lapply(anual, function(x) plot(x[,'chuva'], type='l', xlab= 'anos', ylab =

Re: [R] Multiple graphs boxplot

2012-10-06 Thread John Kane
] Multiple graphs boxplot Dear all I am trying to represent a dependent variable (treatment) against different independent variables (v1, v2, v3v20). I am using the following command: boxplot(v1~treatment,data=y, main=xx,xlab=xx, ylab=xx) However, it provides me

[R] Multiple graphs boxplot

2012-10-05 Thread David Gramaje
Dear all I am trying to represent a dependent variable (treatment) against different independent variables (v1, v2, v3v20). I am using the following command: boxplot(v1~treatment,data=y, main=xx,xlab=xx, ylab=xx) However, it provides me only one graph for v1~treatment. For

Re: [R] Multiple graphs boxplot

2012-10-05 Thread Rui Barradas
Hello, I've once written a function that does more or less what you want, but it has no formula interface. # Input: #x - matrix or data.frame of numeric vectors to graph #by - a factor or coercible to factor multi.boxplot - function(x, by, col=0, ...){ x - as.data.frame(x)

[R] Multiple graphs

2011-03-14 Thread Akshata Rao
Dear R helpers, Last week Mr. Ista Zahn has taken lots of efforts and helped me with the following code generating basel_asset_wise (e.g. bank, corporate, sovereign) graphs. The code works excellently and assetwise grahs are aslo genereated. I have tried to customize the code as per my need.

Re: [R] Multiple graphs

2011-03-14 Thread Jim Lemon
On 03/14/2011 06:22 PM, Akshata Rao wrote: ... However, there is only one small problem with the graphs. The graph doesn't give me the asset names. I.e. in the graph which is meant for bank doesn't show me the name bank. Under the X - label i.e. Rating, it gives me number 1, Similarly for

Re: [R] multiple graphs

2010-09-08 Thread moleps
Problem solved.. My bad. No prb with cdplot or graphics-part. The problem was the a-list.. command which resulted in all three levels of bar$h.r in a[[1]]. Skipping the list function sorted it out. par(mfrow=c(2,2)) a-levels(bar$h.r)[c(1,3,6)] print(a) lapply(a,function(x){

[R] multiple graphs

2010-09-07 Thread moleps
Dear all, I´m trying to create multiple graphs on the same page, but they are all stacked on top of each other. My code: par(mfrow=c(2,2)) a-list(levels(bar$h.r)[c(1,3,6)]) print(a) lapply(a,function(x){ a-subset(bar,h.r==x) with(a,cdplot(wh~Age,ylab=x)) #plot.new()

Re: [R] multiple graphs

2010-09-07 Thread David Winsemius
On Sep 7, 2010, at 8:02 PM, moleps wrote: Dear all, I´m trying to create multiple graphs on the same page, but they are all stacked on top of each other. My code: par(mfrow=c(2,2)) a-list(levels(bar$h.r)[c(1,3,6)]) print(a) lapply(a,function(x){ a-subset(bar,h.r==x)

Re: [R] Multiple graphs

2009-07-28 Thread Alain Zuur
Data Analytics Corp. wrote: Hi, I wrote a simple master function, run(), that has inside six qplot functions. The goal is to type run() and have all six graphs appear as separate windows so that I can copy them into PowerPoint for a client. When I type run(), only the last graph

[R] Multiple graphs

2009-07-27 Thread Data Analytics Corp.
Hi, I wrote a simple master function, run(), that has inside six qplot functions. The goal is to type run() and have all six graphs appear as separate windows so that I can copy them into PowerPoint for a client. When I type run(), only the last graph appears, the first five apparently

Re: [R] Multiple graphs

2009-07-27 Thread Cedrick Johnson
Try dev.new() after each graph is generated. Example code from my setup (adapted a bit to fit your situation): Alternate Method 1: Generate images and insert into PPT png(file = chart1.png, width=800, height=800) #do something pretty dev.off() Alternate Method 2: Generate images with new