search for: pscale

Displaying 15 results from an estimated 15 matches for "pscale".

Did you mean: scale
2003 Mar 08
1
FIX: pscales=list(...) and splom
Dear R Users, When plotting with "splom" I tried to use the pscales=list(...) feature Unfortunately it didn't work at all. Instead the scales always were suppressed. So I looked at the source of panel.pairs and found: "draw <- is.numeric(pscales) && pscales != 0" which rather has to be: "draw <- is.list(pscales) || (is.numeric(...
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts, how can I decrease the space between the tick marks and the corresponding labels in an splom? See here: library(lattice) U <- matrix(runif(4000), ncol = 8) splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large I checked ?panel.pairs but could not find an option for that. Cheers, Marius
2007 Oct 16
1
Adding axis lines to splom plots
...ing the 10x10 groups) onto the overall grid of all 30x30 plots. I enclose a reproducible example: ##### require(lattice) temp.df <- sapply(1:30, function(i) rnorm(20, 0,1)) splom(~temp.df, aspect="fill", varnames=paste("coord", 1:30, sep=""), xlab="", pscales=0, varname.cex=0.6, panel=function(x, y, ...){ panel.xyplot(x,y, cex=0.2, xlab="", ylab="") }) splom(~matrix(c(1,2,3), nc=3), aspect="fill", varnames=NULL, xlab="", pscales=0, axis.line.lwd=4, varname.cex=0.6, panel=function(x, y, ...){ panel.xyplot(...
2009 Feb 21
0
Bold fonts and greek characters in lattice plots
...renders the expression in bold) library(lattice) data(Cars93,package=="MASS") splom(~Cars93[,5:8]|Origin,data=Cars93,panel=function(x,y,...) { panel.splom(x,y,...) dum<-format(cor(x,y,use="complete",method="kendal"),dig=2) panel.text(30,40,bquote(.(dum)),font=2) },pscales=0,col="gray" ) Example code (with Greek characters, no bold) data(Cars93,package=="MASS") splom(~Cars93[,5:8]|Origin,data=Cars93,panel=function(x,y,...) { panel.splom(x,y,...) dum<-format(cor(x,y,use="complete",method="kendal"),dig=2) panel.text(30,40,...
2011 Dec 15
1
lattice key in blank panel
Somewhere I've seen an example of an xyplot() where the key was placed in a location of a missing panel. For example, if there were 3 conditioning levels, the panel grid would look like: 34 12 In this (possibly imaginary) example, there were scatter plots in locations 1:3 and location 4 had no conditioning bar at the top, only the key. I can find examples of putting the legend outside of
2012 Nov 19
2
lattice: defining grouping variable only for the upper/lower panel with splom
Using the mtcars dataset, how to define the grouping variable to be valid only for the upper or lower panel? The following doesn't work: # Code start splom(~data.frame(mpg, disp, hp, drat, wt, qsec), data=mtcars, pscales=0, auto.key=list(columns=3), upper.panel = function(...){ panel.grid(...) panel.xyplot(groups=cyl,...) } ) # Code end -- View this message in context: http://r.789695.n4.nabble.com/lattice-defining-grouping-variable-only-for-the-upper-lower-panel-with-splom-tp...
2008 Sep 21
1
How to put given values in lower triangle of splom-plot?
...ata1+runif(100) data3=data2+runif(100) data=cbind(data1,data2,data3) splom(~data[,1:3],upper.panel=panel.splom, lower.panel=function(x,y,...){ panel.fill(col=gray(500:1000/1000)[round(501-500*cor(x,y))]) panel.text(mean(x),mean(y),round(cor(x,y),2)) }, cex=0.2,aspect=1,pscales=0,varnames=c("Component 1","Component 2","Component 3"),xlab="",ylab="")
2007 Feb 09
1
How to add the variable name to a qqplot or densityplot in the diagonal of an splom?
...boxes. What am I missing? I believe that I need to add something like grid.text(x, ...) to the diagonal panel, but I don't know how to get it cycle through the column labels. And should varname.col = 'blue', varname.cex = 1 be inside the diag.panel() function? splom(szw[, n], pscales = 0, diag.panel = function(x, ...){ panel.qqmathline(x, ...) panel.qqmath(x, ...) }, lower.panel = function(x, y, ...){ panel.xyplot(x, y, ..., col = 'lightblue') panel.loess(x, y, ..., col = 'red') }, upper.panel = funct...
2010 Sep 30
2
panel.pairs in splom
...how to change panel.pairs inside superpanel in order to use my panel.line1 and panel.cor1 functions. ------------------------------------------------------------------------ splom(~temp.df, aspect="fill", varnames=paste("coord", 1:10, sep=""), xlab="", pscales=0, varname.cex=0.6, cex=0.2, superpanel = function(...) { panel.pairs(...) panel.abline(h =6.5, v = 6.5, col = "green", lwd = 4) }) ------------------------------------------------------------------------ I very much appreciate if someone could help me....
2007 Aug 01
1
Splom custom superpanels
...ould be to have the scatterplots in the upper triangle and a color-coordinated correlation matrix on the bottom. So I tried my hand at customizing panel.pairs(), and was rebuffed. 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 +...
2011 May 09
0
Lattice: splom plots for different factors with correlation in lower.panel
...for values with each panel } panel.pairs.cor <- function(z, ...){ panel.pairs(z, upper.panel=panel.splom, lower.panel=function(){}, ...) for(i in 1:3){ panel.text(x=var.cor[[i]]$row, y=var.cor[[i]]$col, labels=round(var.cor[[i]]$values, 2)) } } splom(~iris[1:4]|iris$Species, layout=c(2,2), pscales=0, col="black", xlab="", ylab="", as.table=TRUE, superpanel=panel.pairs.cor) Many thanks, Tom -- View this message in context: http://r.789695.n4.nabble.com/Lattice-splom-plots-for-different-factors-with-correlation-in-lower-panel-tp3510452p3510452.html Sent from t...
2004 Jun 18
2
can't get text to appear over individual panels in multi-panel plot
I'm trying to learn how to create Trellis multi-panel plots, but I'm having some trouble reproducing the graphs shown in Venables & Ripley (2002) (e.g., Figs 4.14 & 4.15). Actually, everything looks fine except for the fact that I can't see any text above the individual panels. I'm using R 1.9.0 for OS-X running on Mac OSX 10.3.3, and I'm drawing the graphs into
2001 Sep 21
2
new versions of grid and lattice
...h API-s of traditional graphics functions to help port existing S-Plus Trellis code. See below for details. o changes in print.trellis to allow mixing of Lattice and usual R graphics. See below for details. o `data' can now be second unnamed argument in high level functions o `pscales' implemented for splom Porting S-Plus Trellis code to Lattice ====================================== One of the basic problems in porting existing Trellis code to R is the unusability of the base R functions like lines and points inside panel functions. To help make the changes more transpa...
2001 Sep 21
2
new versions of grid and lattice
...h API-s of traditional graphics functions to help port existing S-Plus Trellis code. See below for details. o changes in print.trellis to allow mixing of Lattice and usual R graphics. See below for details. o `data' can now be second unnamed argument in high level functions o `pscales' implemented for splom Porting S-Plus Trellis code to Lattice ====================================== One of the basic problems in porting existing Trellis code to R is the unusability of the base R functions like lines and points inside panel functions. To help make the changes more transpa...
2012 Sep 24
1
Question lattice SplomT
...], breaks = NULL, col = hist.col, type = "density", ...) } if (hist %in% c("d", "b")) { llines(d) } grid.text(varname, y=unit(h.diag,"npc"), gp = gpar(cex = cexd)) popViewport() }, varnames = abbreviate(names(data)), pscales = 0 ) ) } ## end SplomT 2012-09-24, 16:25 nr <- 100; nc <- 8; data <- as.data.frame(matrix(rnorm(nr*nc),nrow=nr,ncol=nc)) data[,nc] <- data[,nc-2] + 0.3*data[,nc-1] #generate higher correlations data[,nc-1] <- data[,nc-1] + 0.9*data[,nc] colnames(data)<-paste(&qu...