similar to: Controlling Order of Panels in Lattice Trellis Plots

Displaying 20 results from an estimated 10000 matches similar to: "Controlling Order of Panels in Lattice Trellis Plots"

2011 Dec 30
1
Lattice: Setting Conditioning Panel Order in Trellis Plots
I've looked in Deepayan Sarkar's book without finding how to specify the order of conditioning panels in a trellis plot. Here's the issue I'm trying to resolve: Sampling locations along a stream channel are not sequentially numbered. For example, the panel order for one plot (lower left to upper right, 4 panels per row): SC, SC-1, SC-100, SC-139, SC-140, SC-141, SC-145. SC-2,
2009 Jul 07
1
How to re-order panels and y-axis values in trellis display using lattice
Hi, I have been trying to re-order several items in a trellised barchart display in lattice, but can't seem to figure it out. ###sample code, Stage and Colony have 2 and 3 levels respectively. barchart(Activity ~ Percent | Stage + Colony, data = Percent.df, horizontal = TRUE, layout = c(2,3), xlab = "Percent Time Engaged in Activity", ylab = "Activity") This
2001 Nov 22
2
Missing panels in multipanel lme lattice/trellis
Dear R-supporters, I have results of lme similar to those shown in Fig. 1.21, p.51 of Pinheiro/Bates. However, In my data set, one of the panels is missing, leading to an ugly frame shift of the following panels. How can I replace one of the panels by an empty one to restore the raster? Dieter Menne --------------------------------------- Dr. Dieter Menne Biomed Software 72074 T?bingen Tel
2012 Nov 20
2
[lattice] how to overlay a geographical map on a levelplot?
r-help lattice adepts: I have a question which is somewhat geospatial, so I posted to r-sig-geo rather than here: https://stat.ethz.ch/pipermail/r-sig-geo/2012-November/016757.html > summary: How to overlay a geographical map on each panel in a lattice > (or Trellis), e.g., of levelplot's? Note I am not inquiring about > creating choropleth maps[,] which Sarkar 2008 covers quite
2006 Dec 13
1
Passing arguments to panels in trellis plots
Dear all, I am trying to produce survfit plots in a trellis environment and I would like the plots to be logarithmic. I am trying this: print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE, panel=function(x,groups,subscripts) { t <- survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B)
2012 Jan 17
2
Separate ablines in lattice panels
Searched archives and found some old email threads on the topic. But mot exactly what I think I need. Suppose I have a datafile such as tmp. tmp <- data.frame(var1 = c(rnorm(1000), rnorm(1000, 1, 1)), var2 = gl(2, 1000)) I'd like a plot similar to the one below, but with an abline of v=0 in the lower panel and v=1 in the upper panel. Code below creates two lines in each panel, not quite
2006 Apr 13
1
panel.abline() and trellis.focus() on multipage plots
Hi, I'm recently working on a multipage bwplot() using the lattice package. In this context I was trying to use the panel.abline() function individually on certain panels but not all. After some research I found the trellis.focus() and trellis.unfocus() functions which enabled me to do something like: trellis.focus("panel", 1, 3) do.call("panel.abline", list
2011 Sep 22
3
Bivariate Scatter Plots with Lattice
Data frame has this structure: 'data.frame': 11169 obs. of 4 variables: $ stream : Factor w/ 37 levels "Burns","CIL",..: 1 1 1 1 1 1 1 1 1 1 ... $ sampdate: Date, format: "1987-07-23" "1987-09-17" ... $ param : Factor w/ 8 levels "As","Ca","Cl",..: 1 1 1 1 1 1 1 1 1 1 ... $ quant : num 0.01 0.01 0.01 0.01
2009 Nov 26
1
Adding text in the panels for Trellis plot ...
i was trying to do a for loop for plotting the histograms , but it doesnt work properly > library(lattice) > columns <- 8:153 > plots <- vector("list", length(columns)) > j <- 0 > for (i in columns) + { + plots[[ j <- j+1 ]] <- histogram( ~ data[,i] | data[,2],ylab = "Frequency", + xlab = "Score", xlim = c(1,5), ylim =
2004 Jul 22
1
sorting Trellis panels
Can anyone explain how to properly use index.cond? I cannot include it in the xyplot command and get what I expect. For example, plot<-xyplot(y ~ x | z, data) # let's say z is a factor with six levels gives a nice plot but I am unhappy with the order of panels. I can get the order I want by plot$index.plot[[1]]<-c(1,6,4,3,2,5) I cannot seem to get it with either
2018 Apr 14
2
Extracting specified pages from a lattice ("trellis") object.
Suppose that (e.g.) xyplot() returns an object "xxx" with (say) 3 pages. I would like to extract/plot (print) just one of these pages, e.g. page 2. Here's a toy example: x <- rep(seq(0,1,length=11),12) set.seed(42) y <- rnorm(3*44) a <- rep(letters[1:12],each=11) dta <- data.frame(x=x,y=y,a=a) xxx <- xyplot(y~x|a,data=dta,layout=c(2,2)) I would to extract from
2005 Nov 22
2
change axis format for different panels in xyplot in lattice
Dear R users, My apologies for a simple question for which I suspect there is a simple answer that I have yet to find. I'd like to plot panels in lattice with different graphical parameters for the axes. For example, the code x<-rnorm(100) y<-rnorm(100) z<-c(rep(1,50), rep(2,50)) library(lattice) xyplot(y~x|z) plots two panels with the default black axes. Running the following
2007 Jul 13
3
Direction of panel plots in trellis graphics
Hi, Using library(lattice), is there any way to tell xyplot to plot panels top to bottom, then left to right (i.e. panels are appended vertically, then horizontally). as.table changes the plot direction from left-to-right then top-to-bottom, to right-to-left then bottom- to-top, but that's not quite what I want to do. Thanks Yan
2018 Apr 27
1
[FORGED] Extracting specified pages from a lattice ("trellis") object.
Hi Does this not do what you want ... ? allpages <- dotplot(variety ~ yield | year * site, data=barley, layout=c(2,2)) page2 <- allpages[1:2, 3:4] print(page2) Paul On 24/04/18 17:51, Rolf Turner wrote: > > On 24/04/18 15:17, Paul Murrell wrote: > >> Hi >> >> I think the subsetting works by giving you the panels for the >>
2005 Jul 25
1
order of panels in xyplot
I'm having trouble with the order of the panels using xyplot. I had used this bit of code before and received the desired plot (the code was not identical, but very similar; perhaps more importantly I was working with an older version of R) . Now the panels appear right to left instead of left to right, as it says in the help files, which is what I would like. Does anyone know if this has
2018 Apr 24
0
[FORGED] Extracting specified pages from a lattice ("trellis") object.
On 24/04/18 15:17, Paul Murrell wrote: > Hi > > I think the subsetting works by giving you the panels for the > corresponding levels of the conditioning variable(s).? Note that, if > there is more than one conditioning variable, you will need more than > one subsetting index. > > For example, taking this plot with two conditioning variables and 12 > panels in
2018 Apr 24
2
[FORGED] Extracting specified pages from a lattice ("trellis") object.
Hi I think the subsetting works by giving you the panels for the corresponding levels of the conditioning variable(s). Note that, if there is more than one conditioning variable, you will need more than one subsetting index. For example, taking this plot with two conditioning variables and 12 panels in total ... dotplot(variety ~ yield | year * site, data=barley) ... this produces three
2004 Jul 01
2
y-axis of lattice panels not printing to paper
Greetings, I am printing lattice plots from the R-interface to a printer, and although the y-axes of the left-most panels are visable on the screen, they are not present on the paper when there are multiple panels (ie, >1). For example: trellis.device(bg='white') histogram(~dbh, data=diameter.df) ###print to a printer from the R-interface by clicking the print button on the
2008 May 06
1
Spacing between lattice panels
I'm trying to set up a lattice plot with two y-axes for each panel. (Yes, I know that multiple y-axes are generally a bad idea; the graph is for someone else and they want it that way.) I've used a custom yscale.component in xyplot to achieve this: myyscale.component <- function(...) { ans <- yscale.components.default(...) ans$right <- ans$left foo <-
2012 Jan 01
2
Lattice: Understanding How Points Connected by Lines
A data frame has one factor, one date, and one numeric column. When I plot these using the default pch of the open circle (first attachment), xyplot(TDS ~ sampdate | she.s, data = sheep.cast, main = 'TDS in Sheep Creek', ylab = 'Concentration (mg/L)', xlab = 'Time') I see the higher concentration points toward the right on several panels. But, when I change to using a