search for: panelargs

Displaying 7 results from an estimated 7 matches for "panelargs".

2007 Apr 27
1
add arrows to barchart with groups
....7 barchart(res~s|site,groups=traitement,data=donnees) What I'd like to do is for each site represent with an arrow the difference in value of variable res between normal and tardif values of variable s. I've found one way of doing it: trellis.focus("panel",1,1) xx<-trellis.panelArgs()$x yy<-trellis.panelArgs()$y panel.arrows(as.numeric(xx)[c(1,3)]-0.1,yy[c(1,3)],as.numeric(xx)[c(1,3)]-0.1,yy[c(2,4)],lwd=2,code=3) panel.text(as.numeric(xx)[c(1,3)]-0.35,c(87,87),paste(yy[c(2,4)]-yy[c(1,3)],"\nq/ha"),font=2) trellis.focus("panel",2,1) xx<-trellis.panelAr...
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
...till has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt) trellis.focus("panel", row=1, column=1) arglist=trellis.panelArgs() arglist$type <- "l" do.call("panel.superpose", args=arglist) trellis.unfocus() Should I be able to use panel.superpose() in this way? The new abilities provided by trellis.focus() etc add greatly to the flexibility of what can be done with latti...
2007 Aug 01
1
Splom custom superpanels
...Many times. Four hours of fruitless debugging later, I turn to you for help: panel.pairs(z=teststatfull[,6:12], pscales=0, panel.subscripts=FALSE, subscripts=, upper.panel=lattice.getOption("panel.splom"), lower.panel=function(x1=panel.args$x, y1=panel.args$y, panel.args=trellis.panelArgs(), subscripts=1:dim(teststatfull)[1],...){ panel.fill(col=brewer.pal(9,"RdBu")[round(cor(x1,y1)*4 + 5)]) panel.text(mean(x1), mean(y1), round(cor(x1,y1),2), font=2)}) This code is a bit above my level; I stole some tricks from examples I saw elsewhere, and while it looks over-c...
2007 Jul 30
1
add custom strip to lattice plot
Hi, what is the recommended way of adding a strip to a lattice plot? In the example below I would like to add the value of mean(y) to a new strip.: --8<---------------cut here---------------start------------->8--- library(lattice) ## Small sample data set: p0 <- xyplot(uptake ~ Type | Treatment, data = CO2) p1 <- update(p0, panel = function(x, y, ...) {
2008 Feb 14
1
{lattice/grid} "Error using packet 1" and traceback
On some errors during the plot of a lattice/grid graphics, there is written a message like "Error using packet 1: missing value where TRUE/FALSE needed" into the concering panel and the next panel is plotted. Which option I could use to stop the execution to have a look at the error by a traceback? Regards - Wolfram
2011 Apr 07
1
dotplot as a background for multiple barchart plots (with Lattice)
Hi R users, I'm kind stuck in my R experience... I want to have a multiple barchart with n windows, but with the same background for each window, and I want that background to be a recorded dotplot. First, is it possible ? If so, I guess I have to call a record plot in the panel function but how ? As there is no panel.plot and I can't use the recorded plot as an argument for the
2007 Mar 25
1
controlling panel.width and panel.height in viewports
Dear all, I'm trying to get a series of lattice levelplots to appear in viewports in a particular way but struggling to exert fine control over their appearence. There are two conditions: (a) I only want the levelplot to appear (I don't want axes, colour key, etc) in the viewport and (b) I want the levelplot to expand to the maximum allowable space in the viewport while observing