Displaying 20 results from an estimated 3000 matches similar to: "How to maintain class signature in splom"
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 want, but for some
reason
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 something along the lines of
library(mvtnorm)
library(lattice)
y <-
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):
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[,6:12], pscales=0,
panel.subscripts=FALSE, subscripts=,
2005 Oct 04
1
pdf plotting of splom
Hi,
The following code produces a plot on X11:
splom(~iris[1:4], groups = Species, data = iris,
panel = panel.superpose,
key = list(title = "Three Varieties of Iris",
columns = 3,
points = list(pch = super.sym$pch[1:3],
col = super.sym$col[1:3]),
text = list(c("Setosa", "Versicolor", "Virginica"))))
However,
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)
> splom(~iris[1:4], groups = Species, data = iris,
2004 Mar 03
0
R: Changing background in splom et al.
trellis.device(bg="white", color=F)
before your call to splom could make what you want but
take also a look at
?trellis.par.set
Stefano
> -----Messaggio originale-----
> Da: v.demartino2 at virgilio.it [mailto:v.demartino2 at virgilio.it]
> Inviato: mercoled? 3 marzo 2004 12.10
> A: r-help
> Oggetto: [R] Changing background in splom et al.
>
>
> Context:
2010 Sep 30
2
panel.pairs in splom
Hello,
I have a customized pairs () fonction as follows that displays correctely my
data.
------------------------------------------------------------------------
panel.cor1 <- function (x, y, digits=2, prefix="")
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
r <- cor(x, y,use="pairwise.complete.obs",
2010 Jan 15
1
Lattice: How to color the data points in splom() according to the panel they are plotted?
Dear ExpeRts,
I have the scatter plot matrix as given below. I would like the different "sub-plots" in the scatter plot matrix to be colored differently. How do 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
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, but it fails to plot
(I've commented the
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
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,
Max Kuhn, Ph.D.
Becton Dickinson
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
2011 May 31
1
splom Tick Location
When using the 'splom' function of the 'lattice' packge, is it possible to
get all the tick marks in the outer margins of the plot?
X <- as.data.frame(matrix(rnorm(1000), 100, 10))
plot(X) ## Tick marks are in the outer margin
splom(X) ## Tick marks are inside the on-diagonal panels
Thanks.
- Elliot
[[alternative HTML version deleted]]
2010 Nov 12
1
can not produce graph using "splom"
Hi,
I wrote a function basically to first read an input data file, then open an pdf file and draw graph using "splom". When testing, I ran the function line by line, it can produce nice plot, but with like 50 warnings. However, whenever I ran this function as a whole, it can not produce any plot, the pdf file has nothing in it. It seems the "splom" function even hasn't
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,
columns =
2007 Feb 09
1
How to add the variable name to a qqplot or densityplot in the diagonal of an splom?
splom() doesn't complain here, but writes no names in the diagonal
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
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) &&
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
2011 Jan 20
2
circular reference lines in splom
Hello everyone,
I'm stumped. I'd like to create a scatterplot matrix with circular
reference lines. Here is an example in 2d:
library(ellipse)
set.seed(1)
dat <- matrix(rnorm(300), ncol = 3)
colnames(dat) <- c("X1", "X2", "X3")
dat <- as.data.frame(dat)
grps <- factor(rep(letters[1:4], 25))
panel.circ <- function(x, y, ...)
{
circ1