search for: useouterstrip

Displaying 20 results from an estimated 31 matches for "useouterstrip".

Did you mean: useouterstrips
2009 Apr 28
1
latticeExtra: useOuterStrips and axis.line$lwd
Hi, I'm working on some lattice wireframe figures that have two conditioning factors, and I want the strips labelled on the top and left of the entire plot, rather than above each individual panel. useOuterStrips() does this, but it draws internal axis lines, even after I explicitly set axis.line to 0. Is there a way to use useOuterStrips but without axis boxes? I've included a short example. I know the example looks odd without axis lines, but in my more complicated wireframe plots I think the axis l...
2011 Mar 01
1
Lattice: useOuterStrips and axes
...eExtra) temp <- expand.grid( subject = factor(paste('Subject', 1:3)), var = factor(paste('Variable', 1:3)), time = 1:10 ) temp$resp <- rnorm(nrow(temp), 10 * as.numeric(temp$var), 1) ylimits <- by(temp$resp, temp$var, function(x) range(pretty(x))) useOuterStrips(xyplot( resp ~ time | subject * var, data = temp, as.table = TRUE, scales = list( alternating = 1, tck = c(1, 0), y = list(relation = 'free', rot = 0, limits = rep(ylimits, each = 3)) ) )) This is a matrix of variables on su...
2009 Apr 09
3
Multiple Hexbinplots in 2 columns with a Single Categorical Variable
...base (N=13,000) and a single main categorical discriminator between the groups. I want to look at the time course of a number of continuous biochemical variables over chronologic age. Therefore I believe I need to prepare hexbinplots in two columns with simple regression lines in them (with useOuterStrips (in library(latticeExtra) if possible) and also single hexbinplots with two regression lines (panel.lmlines) corresponding to the two groups to facilitate data comparison. Tick marks and labels should be off in most panels, and the scale in each row will be different. I have some code writ...
2010 Mar 31
1
strip.custom with strip on left for three conditioning variables
I want to use a strip.custom as with useOuterStrips for three conditioning variables. useOuterStrips restricts this to only two conditioning variables, and I cannot figure out how to write strip.custom properly to do this. library(lattice) mtcars$HP <- equal.count(mtcars$hp) #with two factors x2<-xyplot(mpg ~ disp | HP + factor(cyl), mtcar...
2012 Jun 25
1
combineLimits and Dates
...ot;b"), each = length(dates)*2)), x = rnorm(4 * length(dates)), y = rnorm(4 * length(dates))) plt1 <- xyplot(x + y ~ d | g, groups = h, data = dat, type = 'l', scales = list(relation = "free"), auto.key = TRUE) plt1 <- useOuterStrips(plt1) plt1 <- combineLimits(plt1) The x-axis labels are right after the call to 'useOuterStrips' but they get converted to numeric after the call to 'combineLimits'. How do I keep them as date labels? Thanks. - Elliot -- Elliot Joel Bernstein, Ph.D. | Research Associate | F...
2013 Sep 19
3
lattice: double y - problem changing axis color after doubleYScale
Hi, I have had some troubles using doubleYScale. No matter what I try, I cant manage to change the color of the y-axis in the end. I have to produce a black and white plot. There is also something I do not understand regarding fontfamilyj="serif" when using it in: strip=strip.custom() Maybe someone has a better idea for defining which line and dots belong to which y-axis when not using
2013 Feb 22
3
Help xyplot
...a$lon <- factor(data$lon) data$lat <- factor(data$lat) ndata <- data[order(data$lon, data$lat),] fix(ndata) max <- max(ndata$prec, na.rm=TRUE) min <- min(ndata$prec, na.rm=TRUE) #Plot the graph and save as pdf by Mackay suggestion pdf("H:/file.pdf") library(latticeExtra) useOuterStrips( xyplot(prec~month|year*paste(lat,lon), data=ndata, as.table = T, type = c("l", "l","p"), ylim=c(min, max), layout=c(1,4)) ) dev.off()#The actual data have more than 5 thousand data points, Just want to plot a few #selected randomly. Also, if I can put 5 data points (...
2011 Nov 21
1
Lattice graph help
...ease",5))) Titer=as.numeric(c(10,20,30,40, 50,15, 25, 35, 45, 55)) heif=data.frame(n,Breed, Test, Titer) x=barchart( heif[,4]~ heif[,1]| heif[,3]+ heif[,2] ,ylab="titer", layout = c(2,2), scales=list(x=list(at=c(seq(0, 60, by = 15)),tick.number=c(5), labels=c(seq(0, 60, by = 15)))) ) useOuterStrips(x) Kind regards Andrew McFadden MVS BVSc | Veterinary Epidemiologist, Investigation and Diagnostic Centre | Biosecurity New Zealand Ministry of Agriculture and Forestry | 66 Ward St, Wallaceville | PO Box 40 742 | Upper Hutt | New Zealand Telephone: 64-4-894 5611 | Facsimile: 64-4-894 4973| Mobi...
2008 Jun 18
1
Custom strips in lattice
I've recently been playing with strip functions for a data presentation I'd like to use, and have a couple questions. I've cannibalised the useOuterStrips function from latticeExtra to give me the following sample code: library(lattice) myData <- expand.grid( type = c('First 3 days','Whole profile'), sub = paste('Subject', 1:3, '\nDescription'), time = 1:10 ) myData$resp <- rnorm(nrow(myData)) y.limits...
2011 Mar 10
1
Lattice: Feature Request
...sider the following code: library(lattice) library(latticeExtra) # Create some data temp <- expand.grid( subject = paste('Subject', 1:2), var = paste('Variable', 1:2), time = 1:10) temp$resp <- rnorm(nrow(temp)) # Example 1 - this is what I want to get to useOuterStrips(xyplot( resp ~ time | subject * var, data = temp, as.table = TRUE, between = list(x = 0.2, y = 0.2), scales = list(alternating = 1, tck = c(1, 0), col = 'black') )) # Example 2 - set up theme for later use my.opts <- list(default.args = l...
2012 Oct 11
1
dotplot in ".R" with lattice & latticeExtra: proper visualization
...tion with ticks like (0, 500, 1000, 1500, ...) on the vertical y-scale? Here's my data: https://www.dropbox.com/s/egy25cj00rhum40/data.csv And here the program code so far: df.dose <- read.table("data.csv", sep=",", header=TRUE) library(lattice); library(latticeExtra) useOuterStrips(dotplot(z ~ sample.size | as.factor(effect.size)*as.factor(true.dose), groups=as.factor(type), data=df.dose, as.table=TRUE)) I'd be glad for any kind of help! Andres ----- Andres -- View this message in context: http://r.789695.n4.nabble.com/dotplot-in-R-with-lattice-latticeExtra-...
2010 Sep 27
1
conditional assignment of colors in xyplot()
...df1$S2 > 0, "blue","red")) ctp <- xyplot(S2 ~ F2 | F1 + F3, data=df1, as.table=TRUE, ylim=c(-10,10), panel = function(x,y){ panel.barchart(x,y,horizontal=FALSE, origin=0, col=df1$barcols ) } ) useOuterStrips(ctp) # Any help you can provide would be greatly appreciated. # Thank you! # nathan.pellegrin@gmail.com [[alternative HTML version deleted]]
2007 Jun 19
3
Controlling text and strip arrangement in xyplot
I've searched the archives and read the xyplot help but can't figure out the 2 lattice questions below? Consider: library(lattice) DF <- data.frame(x=rnorm(20), y=rnorm(20), g1=rep(letters[1:2], 10), g2=rep(LETTERS[1:2], each=10), g3=rep(rep(letters[3:4],each=5),2)) xyplot(y ~ x | g1 + g2, groups=g3, data=DF) 1) Is there a way to get one strip per row and column
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
...the data is to break-up the data into sub-frames, one frame for each risk, order subjects by total counts, create dotplots, and merge with trellis.c(). This almost works but in the merged plot I cannot decrease column spacing to be small enough. Also, the output of trellis.c() would not work with useOuterStrips() which I really like. My code is in TRY ONE below. Another way to create the plot is specify y-limits for each panel with custom prepanel and panel functions. For each panel, the data-frame for the panel row is isolated, subjects in the data-frame for the current row are ordered by counts, pane...
2009 Sep 19
3
Lattice: combine the same strip?
Hello R helpers, I am producing a figure with dual strips, i.e., x~y | S1 + S2, where S1 and S2 are two strips. For example, in figure 2.1 at http://lmdvr.r-forge.r-project.org/figures/figures.html. In this case, I would like to combine the the top strip, since all three pictures in the same row have the same level based on the first strip. In other words, instead of | -- S11 -- | -- S11 -- |
2010 Jul 02
2
merging plot labels in a lattice plot
Hi, I have a lattice lot conditioned on two variables. Example code is: library(lattice) x <- data.frame(d=runif(100), f1=sample(c('yes', 'no'),100,replace=TRUE), f2=c(rep('Run1',30),rep('Run2',30),rep('Run3',40))) histogram(~d | f1 + f2, x) In the plot, for a given value of f2, there are two panels, one for 'n'
2013 Feb 20
2
xyplot help
I am ploting gridded time series data. I would like the actual lat and lon value appear on the graph-if possible inside the graph as numbers. If there is also more elegant ways to plot the graphs I will appreciate more suggestions. ################################# library(ggplot2) library(lattice) month <- c("Jan", "Feb", "Mar", "Apr", "May",
2008 Aug 25
1
lattice : using both strip and strip.left
Dear all, I'm routinely using lattice and ggplot2, I wish to create a lattice theme that looks not too dissimilar to ggplot's defaults so I can include both graphs in a document with a consistent look. To illustrate my questions, consider the following example: > library(ggplot2) > library(lattice) > > # example data > x <- seq(0, 10, len = 100) > y1 <-
2009 Oct 08
1
xyplot#strips like ggplot?
Dear all, I want to split the strips in xyplot and push them into the margins ... Tried to find this in common documentation (such as Deepayan's book) on lattice ... but so far without success ... Here is the situation: xyplot(Speed~Count|Lane*Day,...) where Speed and Count are numeric, Lane and Day are factors. By default, this makes a double strip on top of each graph. I can change
2011 Nov 22
0
Lattice graph strips and axes
..., 55)) heif=data.frame(n,Breed, Test, Titer) x=barchart( Titer ~ n | Test+Breed, data=heif, layout = c(2,4),between = list(y = c(0.5),x = c(0.5)),scales = list(x = list(alternating = 1, tck = c(1,0)), y = list(alternating = 1, tck = c(1,0))), xlab = "count (n)", ylab = "titer") useOuterStrips(x) Kind regards Andrew McFadden MVS BVSc | Veterinary Epidemiologist, Investigation and Diagnostic Centre | Biosecurity New Zealand Ministry of Agriculture and Forestry | 66 Ward St, Wallaceville | PO Box 40 742 | Upper Hutt | New Zealand Telephone: 64-4-894 5611 | Facsimile: 64-4-894 4973| Mobi...