search for: plot4

Displaying 11 results from an estimated 11 matches for "plot4".

Did you mean: plot
2010 Aug 20
3
if-else function
...variables (here parasites). If a plot has a count equal or higher than 4 for any parasite the function should return a 1 else a 0. Later I can loop the function over all plots. Here I have a little subset of my data: VariablePAR Plot1 Plot2 Plot3 Plot4 ParasiteA 3 1 1 4 ParasiteB 1 2 3 5 ParasiteC 2 1 1 3 ParasiteD 2 1 1 4 ParasiteE 4 1 1...
2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par command. For example I have 7 plots, but instead of arranging them in the default way plot1 plot2 plot3 plot4 plot5 plot6 plot7 I want them in this order plot1 plot2 plot3 plot4 plot5 plot6 plot7 Could somebody tell me how to do this, please? Thanks so many. Suyan
2012 May 10
6
averaging two tables (rows with columns)
..., I think. I have very big data but I have created a hypothetical data for simplification. for example I have : table 1 table 1: species occurance data speciesX speciesY speciesZ speciesXX Plot1 1 0 1 0 Plot2 0 1 1 0 Plot3 0 0 0 1 Plot4 1 0 1 0 Table 2 table 2. species tolerance data EnviA EnviB EnviC speciesX 0.21 0.4 0.17 speciesY 0.1 0.15 0.18 speciesXX 0.14 0.16 0.19 You may noticed that table 2 does not have species Z which was in table 1. Now I want to get th...
2011 Jul 19
5
multiple plots in single frame: 2 upper, 1 lower
Hi, par(mfrow = c(2,2)) will create a 2x2 window that I can use to plot 4 diferent figures in: [plot1 plot2] [plot3 plot4] But how can do 3 so that the bottom spans the width of the upper two: [plot1 plot1] [p l o t 3] Is this possible in R? -- View this message in context: http://r.789695.n4.nabble.com/multiple-plots-in-single-frame-2-upper-1-lower-tp3679574p3679574.html Sent from the R help mailing list arch...
2009 Apr 14
2
subset dataframe by rows using character vector?
...uot; command. plot <- c("plot1", "plot2", "plot3") # character vector used to select rows from data # create fake data from to try out subset v1 <- c(2,5,6,4,3) PLOTID <- c("plot1", "plot2", "plot3", "plot4", "plot5") full.data <- cbind(v1, PLOTID) full.data <- as.data.frame(full.data) # first attempt test <- which(full.data$PLOTID == plot) # second attempt test <- full.data[full.data$PLOTID == plot] I'm sure there is a simple solution here, but I'm unable to...
2007 Dec 09
1
Saving lattice plot as a PDF
...my code so far: windows(height=8,width=6) plot.new() library('grid') lattice.options(layout.heights=list(top.padding=list(x=0.15, units="inches"))) print(plot1, split=c(1,1,2,3), more=TRUE) print(plot2, split=c(1,2,2,3), more=TRUE) print(plot3, split=c(1,3,2,3), more=TRUE) print(plot4, split=c(2,1,2,3), more=TRUE) print(plot5, split=c(2,2,2,3), more=TRUE) print(plot6, split=c(2,3,2,3), more=FALSE) ltext(grid.locator(), label='text', cex=1.3) ltext(grid.locator(), label='text', cex=1.3) And when I open the PDF created I see "text" at the bottom of may...
2009 Jul 27
1
Cross-validating two matrices
...nclude only the species found in both. In this case, the two matrices would therefore include only sp1,sp4,sp5. Thank you so much for any suggestions! E.g.: Matrix 1: Trait1 sp1 1.0 sp2 1.2 sp4 3.1 sp5 4.0 sp7 4.5 Matrix 2 sp1 sp3 sp4 sp5 sp6 plot1 1 2 5 1 0 plot2 3 0 1 2 5 plot3 1 1 2 3 1 plot4 0 1 2 1 0 Brian C. McCarthy, Ph.D. Professor of Forest Ecology Dept. of Environmental & Plant Biology 317 Porter Hall Ohio University Athens, OH 45701-2979 USA T: 740-593-1615 F: 740-593-1130 E: mccarthy at ohio.edu W: http://www.plantbio.ohiou.edu/index.php/directory/faculty_page/brian_mc...
2007 Dec 10
2
Viewport and grid.draw
Hi Deepayan and everyone, I need to add a common legend to a group of latice graphs, I have tried different ways using viewport and grid.draw without success. Here is what I have: plot.new() library(grid) library('IDPmisc') print(plot1, split=c(1,1,2,4), more=TRUE) print(plot4, split=c(2,1,2,4), more=TRUE) print(plot2, split=c(1,2,2,4), more=TRUE) print(plot5, split=c(2,2,2,4), more=TRUE) print(plot3, split=c(1,3,2,4), more=TRUE) print(plot6, split=c(1,4,1,4), more=FALSE) grid.text(vp=do.call(viewport,grid.locator(unit="npc")), label='A', gp=gpar(fontsi...
2009 Sep 24
1
Creating grid graphics with grid.layout
...ts). This is to allow the user to define how much margin should exist around all plots and between the plots. I then use lapply to visit only those viewports to place the plots by specifying an x and y vector like so: x <- c(2,4,2,4) y <- c(2,2,4,4) i <- 1 lapply(list(plot1,plot2,plot3,plot4),function(j){ print(j,vp=viewport(layout.pos.col=x[i],layout.pos.row=y[i]) i <<- i + 1 }) Looks kludgey. Is there a better way? Also, I created debug code to visit those viewports where *nothing* is supposed to be printed except for a grey box with black edges: z <- outer(logic...
2011 Nov 15
1
grid.arrange, grid.layout - legend, global y axis title
...widths = unit(c(7.5,6.5), "cm"), heights = unit(rep(5, 2), "cm")))) print(plot1, vp = viewport(layout.pos.row = 1, layout.pos.col = 1)) print(plot2, vp = viewport(layout.pos.row = 1, layout.pos.col = 2)) print(plot3, vp = viewport(layout.pos.row = 2, layout.pos.col = 1)) print(plot4, vp = viewport(layout.pos.row = 2, layout.pos.col = 2)) This is working well so far. The y-axis are for all plots the same so I'd like to have a global y-axis title on the left side. How can that be done using my approach? I also would like to add a global vertical legend for my plots below...
2003 Sep 11
1
Customised legend in lattice
...s.data.frame(cbind(y1,y2,y3,y4,y5,z1,z2,z3,z4,z5))->tmp leg.txt<-c("Rating 1","Rating 2","Rating 3","Rating 4","Rating 5") colo<-rep(c("black","red","darkgreen","navyblue","rosybrown"),2) plot4<-xyplot(y1+y2+y3+y4+y5+z1+z2+z3+z4+z5~x1, cex=2, xlab="number x", ylab="Probability", bg="white", xlim=c(0,7), ylim=c(0,1), type="l", allow.multiple=TRUE, data=tmp, panel=function(x,y,subscripts,...){...