Displaying 20 results from an estimated 10000 matches similar to: "Direction of panel plots in trellis graphics"
2006 Oct 27
2
Question: xyplot panel configurations for Trellis package
Hi,
I am new to R community and I have a question on panel configurations in
the Trellis package.
Particularly, I have the following code:
require(lattice)
plotTable <- NULL
Date <- seq(as.Date("2006-11-01"), as.Date("2009-12-01"), by = 1)
nYear <- length(unique(format(Date,"%Y")))
plotTable$Date <- as.Date(paste(unique(format(Date, "%Y-%m")),
2001 Mar 10
3
Problem With Model.Tables Function
I am using R for the first time in one of my classes. My students have
alerted me to a problem for which we have not found an answer. We find
that some means returned by the model.tables function are not correct when
missing data is present in analysis of variance problems. We have
duplicated the problem using R 1.2.0, 1.2.1, and 1.2.2 under Windows 98
and several distributions of Linux (Redhat
2011 Oct 01
2
Entering data into a multi-way array?
Hello: I am a novice R user, but I have been working my way through the
manuals / tutorials, ... I have R / Deducer up and running, and know the
basics.
I want to analyze a microarray (gene expression) dataset.
I need to input the data into R as a multidimensional (multi-way) array,
something on the order of
15,000 x 3 x 8 x 2 [genes x replicates x time points x treatments]
I've
2006 Dec 13
1
Passing arguments to panels in trellis plots
Dear all,
I am trying to produce survfit plots in a trellis environment and I
would like the plots to be logarithmic.
I am trying this:
print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE,
panel=function(x,groups,subscripts)
{
t <- survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B)
2003 May 13
1
several regression lines in panel of xyplot (trellis graphics)
Dear r-help,
I need to draw xyplot() graphs with several regression lines:
one line for the whole range of x (the variable on the horizontal
axis) and two additional lines for subranges of x.
Is it possible to make first regression line (panel.lmline(x,y,...);)
to be drawn on the whole graph
and regression lines of the subsets to be drawn only over their subsets?
I have defined
2006 Apr 13
1
panel.abline() and trellis.focus() on multipage plots
Hi,
I'm recently working on a multipage bwplot() using the lattice package. In
this context I was trying to use the panel.abline() function individually on
certain panels but not all. After some research I found the trellis.focus()
and trellis.unfocus() functions which enabled me to do something like:
trellis.focus("panel", 1, 3)
do.call("panel.abline", list
2004 Apr 20
1
FW: Aligning different trellis plots
All --
I am trying to combine trellis plots and having a couple of small problems.
I'm trying to combine two trellis plots that display data of different
kinds. Each has a single row of plots, and I'd like to display them over
one another. So I use
print(plot1, split = c(1,1,2,1), more = TRUE)
print(plot2, split = c(1,2,1,2))
I end up with two minor issues. First, I'd like to
2011 Dec 30
1
Lattice: Setting Conditioning Panel Order in Trellis Plots
I've looked in Deepayan Sarkar's book without finding how to specify the
order of conditioning panels in a trellis plot. Here's the issue I'm trying
to resolve:
Sampling locations along a stream channel are not sequentially numbered.
For example, the panel order for one plot (lower left to upper right, 4
panels per row): SC, SC-1, SC-100, SC-139, SC-140, SC-141, SC-145. SC-2,
2004 Jul 22
1
sorting Trellis panels
Can anyone explain how to properly use index.cond? I cannot include it
in the xyplot command and get what I expect. For example,
plot<-xyplot(y ~ x | z, data)
# let's say z is a factor with six levels
gives a nice plot but I am unhappy with the order of panels. I can get
the order I want by
plot$index.plot[[1]]<-c(1,6,4,3,2,5)
I cannot seem to get it with either
2010 May 06
2
reading in file with different row length
Hi all,
I have a file, say, test.txt, which contains the following information.
I'm trying to read in the file and specifying the missing values as NA
so that each column has the same number of rows.
I've tried all sorts of manipulation but to no avail.
r1 r2 r3
1 3
2 3
3 2 3
4 2 3
5 2 3
6 2 3
7 2
8 2
9 2 3
The output should be
r1 r2 r3
1 NA 3
2 NA 3
3 2 3
4 2 3
5 2 3
6 2 3
7 2
2007 Nov 30
1
Set panel background color in a multi-group trellis plot
Hi everyone,
I am trying to change some of the default colors in a
multipanel-multigroup lattice graphic, but when I change the panel color
to white, the only group that is plotted is the last one, as panel.fill
overwrites all the previous ones. Is there any way to set the panel
background color for the first panel to a color and keep the rest
transparent?
My code looks like this:
#first set
2006 Jan 26
1
How to make two side-by side trellis plots same size
Dear Latticers,
I want to position two trellis plots of different forms
side-by-side. The plot types are slightly different,
aspect=1 required, but panels should look the same in
both plots. Current workaround uses a guessed factor.
Any way to improve this?
Dieter
library(lattice)
n1 = 20
# I cannot rbind df1 and df2, because the x-dimensions are
# different and must be scaled individually
2007 Jun 13
1
Annotating trellis graphics
I'm using xyplot to generate a trellis plot with each panel containing a
scatterplot and a best fit line. Is it possible to write the slope of
the best fit line in each panel?
--
Alan S Barnett <asb at mail.nih.gov>
NIMH/CBDB
2004 Nov 08
3
location of key in panels of trellis plot
Hi,
I want to insert a key into each panel of a trellis plot, which I can do
with a custom panel function that calles draw.key. The problem arises
because I want the top right hand corner of the key to start in the top
right hand corner of the panel. If you run my code below, you can see that
the key appears in the center of each panel. This is because the default
viewport in draw.key is the
2002 Sep 09
1
multiple "keys" in Trellis plots?
My xyplot has a number of panels, and I'd like a separate key for each
rather than a single key for the entire set. However, I cannot find a way to
pass multiple key definitions to xyplot's "key" argument.
Allow me to throw out a simple example:
require(methods)
require(lattice)
## define sample data
myFrame1 <- data.frame(a=1:100, b=rep(1:10,10), c=unlist(lapply(1:10, rep,
2002 Dec 06
2
Mutiple page trellis plots with relation = "free" or "sliced"
Hello,
Has anyone out there encountered a problem like this:
xyplot(Plasma ~ Serum | Analyte,
data = sp.df,
aspect = 1,
layout = c(1, 1, 200),
scales = list(relation = "free")
)
Gives the error:
Error in pretty(x[is.finite(x)], ...) : x must be numeric
On the other hand, this works (but I don't want the default of having
everything on the same
2007 Apr 13
1
trouble getting b&w plots using trellis graphics
I'm having trouble getting a black and white plot using the trellis device.
I have color graphics, but I'd like to use b&w for a paper. For example,
trellis.device(color=F)
d <- read.table(textConnection("
A,B
0,1
1,2"), header=T, sep=",")
xyplot(A ~ B, data=d, type="o", lty=c(1:2), col=2, pch=19:20)
dev.off()
gives me a red line even though I
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 Dec 03
1
organising the display in Trellis plots
Hallo,
I would like to organise at my pleasure the layout of a trellis plot.
Currently I have a 3x3 matrix display and 7 plots. Is it possible to
choose which specific panels will stay empty?
I tried index.perm to arrange the order. Then there is perm.cond which I
could not understand if it can serve for my purpose since I cant really
find which kind of data it accepts.
Thank you for the help.
2013 Feb 22
4
Controlling Order of Panels in Lattice Trellis Plots
With multiple panels in a lattice trellis plot the sequence is, for
example, 1, 10, 11, 12, 2, 3, 4. I want the sequence to be 1, 2, 3, 4, 10,
11, 12.
Reading ?strip.default and the appropriate section in the Lattice book I'm
not seeing how to specify the 'human' numeric order rather than the computer
numeric order.
A pointer will be appreciated.
TIA,
Rich