Displaying 20 results from an estimated 6000 matches similar to: "Putting splom in a function"
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
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
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
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 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 Oct 02
1
splom pairs and groups argument
Hello,
I'm trying to pull off a certain graph using splom, and can't quite get my panel functions right.
Basically, the equivalent using pairs would be something like this (using iris data set as an example):
panel.corval <- function(x, y, digits=2, prefix="", cex.cor,col,pch)
{
usr <- par("usr"); on.exit(par(usr))
par(usr = c(0, 1, 0, 1))
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,
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=,
2009 Aug 27
2
Winsorized mean and variance
Hello everybody,
after searching around for quite some time, I haven't been able to
find a package that provides a function to compute the Windorized mean
and variance. Also I haven't found a function that computes the
trimmed variance. Is there any such package around?
thanks,
Roberto
2007 Feb 28
3
Datamining-package rattle() Errors
Dear Group
I have few errors while installing package rattle from CRAN
i do the installing from the local zip files...
I am using R 2.4.0 do i have to upgrade to R2.4.1 ?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
utils:::menuInstallLocal()
package 'rattle' successfully unpacked and MD5 sums checked
updating HTML package descriptions
> help(rattle)
No
2013 Oct 15
1
how to set pch in auto.key for splom
Dear All,
I am using most current version of R (3.0.2) and lattice (0.20-24). But can
not set appropriate pch type with the following code. Could anyone help me?
splom(~iris[1:4], groups = iris$Species, pch=1:3, auto.key = list(space =
'top', columns = 3, pch=1:3))
Thanks
John
[[alternative HTML version deleted]]
2007 Jan 24
1
Probabilities calibration error & ROCR
Hello,
I'd need to compute the calibration error of posterior class
probabilities p(y|x) estimated by using rpart as classification tree.
Namely, I train rpart on a dataset D and then use predict(...
type="prob") to estimate p(y|x).
I've found the possibility to do that in the ROCR package, but I
cannot find a link to a paper/book which explains the details of the
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,
2011 Apr 18
4
splom, plotmath: how to add three lines of information with alignment?
Dear expeRts,
I would like to create a scatter plot matrix with splom(). The lower panel should
contain some additional information about the samples shown in the upper panel
plot, see the splom() call below. Now two questions came up:
(1) The lower panels show "tau" and "alpha" on top of each other. How can I plot
*three* expressions on top of each other? I tried several
2009 Oct 22
1
loop vs. apply(): strange behavior with data frame?
Hi everybody,
I noticed a strange behavior when using loops versus apply() on a data frame.
The example below "explicitly" computes a distance matrix given a
dataset. When the dataset is a matrix, everything works fine. But when
the dataset is a data.frame, the dist.for function written using
nested loops will take a lot longer than the dist.apply
######## USING FOR #######
dist.for
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) &&
2008 Oct 21
1
Scatterplot Matrix
Is there any way to make the points on my scatterplot matrix correspond to numbers instead of dots? I know how to do this on a regular 2-variable scatterplot but not on the matrix. Thanks!
-Lydia
[[alternative HTML version deleted]]
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
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 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