search for: superpanel

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

2007 Aug 01
1
Splom custom superpanels
....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-clunky, it works. Works, at least, in creating the superpanel: you can try it yourself by replacing z with a data frame or matrix of your choice and installing the lattice and RColorBrewer packages. However, when I try to insert this into the splom function, it all goes to pot. R scolds me for either missing subscripts, improper subscripts when I try to...
2010 Jan 15
1
Lattice: How to color the data points in splom() according to the panel they are plotted?
...sponding sub-plot of the scatter plot matrix are shown in the specified color? Cheers, Marius Here is the code: library(lattice) entrymat=matrix(0,nrow=3,ncol=3) entrymat[1,2]="black" entrymat[1,3]="blue" entrymat[2,3]="red" entrymat=t(entrymat) splom(~iris[,1:3],superpanel=function(z,...){ mymat.df=data.frame(rows=as.vector(row(entrymat)),cols=as.vector(col(entrymat)),entries=as.vector(entrymat)) mymat.df=subset(mymat.df,cols<rows) with(mymat.df,{ panel.text(x=rows,y=cols,labels=entries) }) panel.pairs(z,upper.panel=panel.splom,lower.panel=function(...)...
2008 Sep 21
1
How to put given values in lower triangle of splom-plot?
Dear R-experts, I have found a splom-modification online which is given below. This works perfectly, but I would like to have a matrix of given correlation values to be used in the lower triangular part (lower.panel) of the splom-plot instead of calculated correlation values. Here is the matrix I would like to use (it can be any other convenient data structure):
2010 Sep 30
2
panel.pairs in splom
....panel=panel.line1,upper.panel=panel.cor1 ) ------------------------------------------------------------------------ However I decided to add a green line to my display and I was not able to do it with the pairs() function, I used insted splom(). But I dont'know 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,...
2007 Oct 16
1
Adding axis lines to splom plots
Hi, I am trying to produce a 30x30 lattice grid. The 30 variables naturally fall into three groups of ten and I would like to add thicker axis lines around these to highlight this. However, I can only do this separately, so far, and I don't know how to superimpose the grid with the thicker lines (separating the 10x10 groups) onto the overall grid of all 30x30 plots. I enclose a
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
...get this to work properly. (2) Is there the possibility to plot the two/three lines (containing "tau = ..", "alpha = ..") aligend according to the equality sign? Cheers, Marius library(lattice) f <- function(i,j) i+j U <- matrix(runif(3000), ncol=3) splom(U, superpanel=function(z, ...){ tau <- cor(U, method="kendall") df=data.frame(rows=as.vector(row(tau)), columns=as.vector(col(tau)), vals=as.vector(tau)) # data frame of row indices, column indices, and tau values df=subset(df,columns<rows) # subset for low...
2010 Jan 31
1
accessing column and row numbers inside splom in lattice
...rmvnorm(100,c(0,0,0),diag(3)) splom(y,panel=function(x,y,...){ # I would like to access the panel row i and column j here, e.g., # print(i,j) panel.splom(x,y,...) }) but I haven't been able to find a way to do this; current.row() and current.column() only vary at the level of splom's superpanel function. Does anyone have a suggestion on how to access this information? I have looked into tweaking panel.pairs() to pass the i,j row,column information into the splom panel function, but it is not trivial because panel.pairs() calls several lattice-internal functions which are not exp...
2011 May 09
0
Lattice: splom plots for different factors with correlation in lower.panel
...per.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 the R help mailing list archive at Nabble.com.
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(pscales) &&
2003 Sep 04
3
Putting regression lines on SPLOM
Sorry Folks, I'm sure I could suss out the answer myself but I need it soon ... ! 1. Given a set of 4 variables X,Y,Z,W in a dataframe DF, I make a scatter-plot matrix using splom(DF). 2. I do all regressions of U on V using lm(U~V), where U and V are all 12 different ordered pairs from X,Y,Z,W. 3. Now I would like to superpose the regression lines from (2) onto the corresponding
2006 Jan 01
20
A comment about R:
Readers of this list might be interested in the following commenta about R. In a recent report, by Michael N. Mitchell http://www.ats.ucla.edu/stat/technicalreports/ says about R: "Perhaps the most notable exception to this discussion is R, a language for statistical computing and graphics. R is free to download under the terms of the GNU General Public License (see http://www.r-project.