Displaying 20 results from an estimated 1794 matches for "xyplots".
Did you mean:
xyplot
2008 Nov 10
4
Labeling points with xYplot
Hello R-Users,
I am trying to label points on an xYplot. I can label the points, but
then I lose the error bars. I suspect that I should be using
panel.xYplot rather than panel.xyplot, but that didn't work either...
Can anybody help me out? Example code is below. First xYplot has error
bars, second tries to label the points and the bars disappear.
Thanks,
John
a=c(1:4)
2001 Jun 15
1
Pass-through of unevaluated arguments
Thanks to Deepayan Sarkar (lattice) and Paul Murrell (grid)
I have nearly finished porting the Hmisc library's xYplot
function to R. xYplot extends xyplot to allow for error bars,
bands, and a few other features. In S-Plus I extended the
Trellis function xyplot mainly by writing panel.xYplot.
In R, xyplot contains a lot of code, so I implemented xYplot
by calling xyplot from it. Things are
2010 Feb 08
3
What is the equivalent function in R to xyplot in S?
Page 140 of MASS uses the function xyplot. But I don't find it in R.
Is there a package that I should load to use xyplot. Or there is a
function with a different name in R that does the same thing as xyplot
in S.
xyplot(Gas ~ Temp | Insul, whiteside, panel =
function(x, y, ...) {
panel.xyplot(x, y, ...)
panel.lmline(x, y, ...)
}, xlab = "Average external temperature (deg. C)",
ylab
2010 Jan 10
3
How to control spaces between axis, tick and label in xyplot or xYplot?
Dear R users,
I encounter a problem regarding space control in xyplot. Basically, I want
to control spaces between label, tick and axis. I remember there is a
function called mgp in general plot. Is there a similar function for xyplot
or xYplot?
Below is my basic code:
myplotkid<-xyplot(expected_offspringnumber~afr|decade,groups=SES,data1,
2002 Apr 17
1
No output from (lattice) xyplot called within loops
Hello
>From the following script I received
a grafic output when I called:
- xyplot.test( 'green3' )
- call.xyplot.test( 'blue3' )
I did NOT receive a grafic output
when I called:
- loop.xyplot.test( 'red3' )
What's the Problem?
NB: I am using R 1.4.1 on Linux.
--------- START OF SCRIPT ----------------
n <- 1000
x <- seq( 1, n )
y <- rnorm( n )
2010 Mar 05
4
conditioning variable in panel.xyplot?
I wish to create a multipanel plot (map) from several datasets ("d" and
"q" in the example below). I can condition the main xyplot statement on
the "site" variable, but I don't know how to pass a conditioning variable
to panel.xyplot plot so that the x-y coordinates from dataset q are only
plotted at the appropriate site.
library(lattice)
d <-
2006 Dec 28
2
lattice xyplot: plot multiple lines with different colors
Hi everyone,
I am using the lattice package to plot some simulation results, by using
the function xyplot(). However, I cannot find a way to plot multiple
lines within the same xyplot and to have each of the lines be drawn in a
different color.
This is what I am currently doing:
xyplot(a + b + c ~ x, my_data, panel = panel.lines)
but, of course, all lines are drawn in the same color.
What
2003 Jan 20
2
Adding reference lines to xyplot
I'm trying to add a set of reference lines to a multipanel xyplot
xyplot(y ~ x | Visit,
panel = function(x, y, ...){
panel.xyplot(x, y, ...)
abline(v = c(0.5, 1))
})
However, the reference lines are different for different visits. For
example, for the first 2 visits, I'd like vertical lines at x = 0.5 and 1.
For visits 3 and four, I'd like vertical lines at x = 1 and 1.5. I can
2008 Sep 23
5
xyplot problem
Hi all,
I am trying to produce some panels with dots in an X/Y plane where the
diameter of the dots indicates a Z value (like e.g. earthquake maps where dot
sizes indicate magnitudes and X/Y the location).
This works fine with xyplot, e.g.:
xyplot(1:3~1:3,cex=1:3,pch=16)
However, when I do this with a panel variable, e.g.:
x<-rep(1:3,5)
y <- rep(1:3,5)
sz <- rep(1:5,each=3)
grp
2011 Jul 27
2
Creating a flat legend 'grob' for lattice xyplot
Hi,
I want my xyplot legend to be flat, not tall, and there seems to be no way
for xyplot's auto.key and key elements to do this: I tried many, many
permutations of what I could find in the archives and reading the
documentation. If there there's a way to make it flat, please tell me what
the magic incantation is.
Here's a simple example of what I like to see. The xyplot will be a
2009 Oct 27
2
Print several xyplots to the same page in a pdf file
Hello everybody,
I'm using the lattice package and the xyplot to make several graphs like below. However, I can just print the three grouped plots onto one page as I'm putting them into a pdf-file, which gives me a huge amount of pages... Is it possible to put them all, or at least more than one on the same page, for instance put three groups beside each other like columns?
...
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 Feb 14
2
xyplot, overlay two variables on one plot with group factors
All
I want to overlay two variables on the same plot following their appropriate
grouping. I have attempted to use subscripting in panel with panel.xyplot,
but I can't get the grouping to follow into the panel...here is an
example...
dat<-data.frame(
y= log(1:10),
y2=10:19,
x=1:10,
grp = as.factor(1)
)
dat2<-data.frame(
y= log(10:19),
y2= 20:29,
x=1:10,
grp = as.factor(c(2))
)
2008 Nov 11
1
Retrieving x argument name from a trellis object in R 2.8.0
Dear all,
let consider the following function:
Fun1 <- function() {
library(lattice)
plot1 <- 1:10~1:10
pl1 <- xyplot(plot1)
return(pl1$call$x)
}
In R 2.5.0 (or older version) we have
> Fun1()
plot1
but starting from R 2.5.1 until the latest R 2.8.0 we obtain instead
> Fun1()
NULL
because pl1$call seems to be equal to xyplot() without arguments.
Something like
2005 Jun 22
1
How to use expression in label with xYplot
Dear R-List,
I want to use the label function (from Hmisc library) to allow for the
names of my isotopes.
library(Hmisc)
library(lattice)
library(grid)
num <- c("78","137","129m")
nom <- c("Ge","Cs","Te")
df <- data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom))
if I use this function to create the labels :
lab <-
2004 Mar 26
1
xyplot inside a for loop problem
Hello everyone
Could someone please explain me why are xyplot() calls inside a for loop
unsuccessful?
Calling plot() is OK but xyplot() just opens the graphics window and that
is all. No error, no warning :-( The same xyplot() outside for loop works
fine.
---------------------------------------------------------
library(lattice)
# OK:
plot(1,2,type='p',main='standalone plot')
#
2006 Jun 08
1
panel.abline and xyplot
Dear All,
I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e.
xyplot(Y ~ Z | X_1*X_2, data = df)
I want something like:
abline(v = 5) if X_1=0 and X_2 = 0
abline(v =
2011 Jul 28
2
not working yet: Re: lattice overlay
Hi Dieter and R community:
I tried both of these three versions with ylim as suggested, none work: I
am getting only single (pch = 16) not overlayed (pch =3) everytime.
*vs 1*
require(lattice)
xyplot(Sepal.Length ~ Sepal.Width | Species , data= iris,
panel= function(x, y, subscripts) {
panel.xyplot(x, y, pch=16, col = "green4", ylim = c(0, 10))
panel.lmline(x, y, lty=4, col =
2010 Dec 09
4
[lattice xyplot] Help needed in help in customizing the panel.abline() function
Hi folks,
I need some help in customizing the abline() function to be used in a
lattice plot. I have attached a reproducible example below.
I need help in the following snippet:
disc <- xyplot(cnt_gt50pct_disc ~ week_num|sku_num, data=DF,type =
"h",lwd=2,panel = function(...) {
panel.abline(v = 8, lty = 2)
panel.xyplot(...)
})
Is there a way I can give
2008 Oct 23
2
I have an xyplot, I want to keep the format, but only show x or y
Good Morning,
I am using xyplot to show two variables for a large number of
subjects.
Currently I am using xyplot(y~x|as.factor(ID), layout=c(7,9)) to
give me a little plot of the x and y factors for each ID.
The purpose of the plot is to let the PI quickly look through the
data for irregularities.
The good news is that they like the layout of the xyplot, but they
don't want to have to