search for: splom

Displaying 20 results from an estimated 74 matches for "splom".

2007 Aug 01
1
Splom custom superpanels
I thought one nice addition to a splom figure would 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...
2010 Oct 07
1
Lattice: Histogram in splom diagonals
Dear list, I want to plot several variables with splom and in the main diagonal, instead of the variable names, I'd like to plot an histogram of corresponding variables. Searching I did not find the correct syntax, only some tips in an old post in the list, but this comments help to plot only density lines instead of histograms. I had some code,...
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 a...
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
2010 Jan 31
1
accessing column and row numbers inside splom in lattice
Hi, When using splom() in the lattice package, I would like to be able to access the row and column number of each individual pairs plot , similar to the way that current.row() and current.column() can be used in other lattice plotting functions such as xyplot. For example, I would like to be able to write som...
2010 Jan 15
1
Lattice: How to color the data points in splom() according to the panel they are plotted?
...o I get all points shown in the upper-left plot (on position (1,1) in the scatter plot matrix) to be plotted in blue, and the points shown in the plot to the right (on position (1,2) in the scatter plot matrix) to be plotted in red? More generally, how can I provide a matrix of colors to be used by splom() such that all data points in the corresponding 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"...
2007 Feb 21
2
Splom plot:how to plot with different symbols?
Hi, Kindly let me know if I posted a wrong question in the forum. I want to draw a splom plot with different symbols in plot. My command is as follows: splom(~ log10(splomData[2:3]), groups = programs, data = splomData, panel = panel.superpose, key = list(title = paste(splomLoop,"Programs of Hog Analysis (Sorted by LR(GB))"), panel = panel.superpose, colu...
2011 Jan 20
2
circular reference lines in splom
...lty = 2) circ2 <- ellipse(diag(rep(1, 2)), t = 2) panel.xyplot(circ2[,1], circ2[,2], type = "l", lty = 2) panel.xyplot(x, y) } xyplot(X2 ~ X1, data = dat, panel = panel.circ, aspect = 1) I'd like to to the sample with splom, but with groups. My latest attempt: panel.circ2 <- function(x, y, groups, ...) { circ1 <- ellipse(diag(rep(1, 2)), t = 1) panel.xyplot(circ1[,1], circ1[,2], type = "l", lty = 2) circ2 <- ellipse(diag(rep(1, 2)), t = 2) panel....
2010 Nov 11
1
change axis labels and text size in "splom"
Hi everyone: I'm using "splom" to draw scatterplot matrix. I'm wondering how can I change the axis labels to c(1,10,100,1000,...) instead of c(1,2,3,...), and also how can I change the text size (for labels)? Thanks a lot! xcui
2007 Oct 16
1
Adding axis lines to splom plots
...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 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", va...
2007 Aug 30
2
Need help putting histograms on the diagonal of a splom plot
Hello, I am in need of help in putting histograms on the diagonal of a plot produced with splom(). The plot matrix I am trying to produce is to have standard scatterplots in the upper-left triangle, contour plots in the lower-right triangle, and histograms on the diagonal. I have a function that does the first two, but the histograms on the diagonal has been beyond my ability. Here is my...
2007 Feb 14
3
Putting splom in a function
Hello R list, I have a little problem with splom. I'd like to wrap it in a function, for example: multi.scatterplot <- function(data,groups,cols,colors) { splom(~data[,cols], groups = as.symbol(groups), data = data, panel = panel.superpose, col=colors) } and then call it like in multi.scatterplot(iris,"Species",1:4,c(&quot...
2010 Aug 27
0
How to maintain class signature in splom
All, I was having trouble trying to create a new class of data and pass it on to splom (in the lattice library). I mentioned this to Martin Morgan after a talk he gave. Following is not so much a question, but rather an answer from Morgan that might be useful to others. Here is the edited part of an email conversation with him: On Thursday, August 26, 2010 1:36 PM, Martin Mor...
2010 Sep 30
2
panel.pairs in splom
...RUE), col= "red" ) } pairs(temp.df, lower.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=""),...
2012 Dec 11
1
Focus on a sub-panel of a splom with trellis.focs() -- return coordinate of sub-panel, or names of variables therein
Hi, I'd like to be able to generate a splom plot in R and then use my mouse to click on one of the sub-panels (panel.pairs, specifically) and have R return either the coordinates of that sub-panel, or even better, the names of the corresponding variables plotted in that sub-panel. Here's an example to work with: > library(lattice) &...
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 panels from (1). (By the way, the data used for the regressions are not quite the same...
2004 May 06
1
modifying the text size in splom
All, I have long variable names that are being fed through splom (R 1.8.1). I'd like to resize the text printed on the diagonals to better display the names (unless anyone can suggest another approach - creative use of varnames). I've looked at the code, R-Help, ?splom and the Trellis User's Guide to no avail. Any suggestions? Thanks in advance, Ma...
2011 May 09
0
Lattice: splom plots for different factors with correlation in lower.panel
Hello list, I am looking to create a figure for my dataset using splom, where there is a splom subplot for each level of a factor within, for example, a 2x2 layout. For each subplot, I wish to put the r-value between each variable pair in the lower panel. The code I have thus far is below, using the iris dataset so that it is reproducible. This almost does what I w...
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-d...
2004 Mar 03
2
Changing background in splom et al.
Context: Windows XP, R 1.8.1 I'm studying Venables-Ripley "MASS" book and having a go at the many examples in library MASS. The code I'm checking (from script ch04.R) now is ...... data(swiss) splom(~ swiss, aspect = "fill", panel = function(x, y, ...) { panel.xyplot(x, y, ...); panel.loess(x, y, ...) } ) which produces an agreable plot with a gray background and cyan points, but..... Copying the plot as a metafile into Word and having a laser printer I'd better stick t...