Displaying 20 results from an estimated 20000 matches similar to: "Custom strips in lattice"
2011 Mar 01
1
Lattice: useOuterStrips and axes
Consider the following:
library(lattice)
library(latticeExtra)
temp <- expand.grid(
subject = factor(paste('Subject', 1:3)),
var = factor(paste('Variable', 1:3)),
time = 1:10
)
temp$resp <- rnorm(nrow(temp), 10 * as.numeric(temp$var), 1)
ylimits <- by(temp$resp, temp$var, function(x) range(pretty(x)))
useOuterStrips(xyplot(
resp ~ time
2009 Apr 28
1
latticeExtra: useOuterStrips and axis.line$lwd
Hi,
I'm working on some lattice wireframe figures that have two conditioning
factors, and I want the strips labelled on the top and left of the
entire plot, rather than above each individual panel. useOuterStrips()
does this, but it draws internal axis lines, even after I explicitly set
axis.line to 0. Is there a way to use useOuterStrips but without axis
boxes?
I've included a short
2009 Apr 09
3
Multiple Hexbinplots in 2 columns with a Single Categorical Variable
Dear Ladies and Gentlemen,
I have a fairly large database (N=13,000) and a single main categorical
discriminator between the groups.
I want to look at the time course of a number of continuous biochemical
variables over chronologic age.
Therefore I believe I need to prepare hexbinplots in two columns with simple
regression lines in them (with useOuterStrips (in library(latticeExtra) if
2011 Mar 10
1
Lattice: Feature Request
Hi,
I'm currently designing some global themes for use with lattice, and have
hit a snag. There doesn't appear to be (in xyplot at least) a way of setting
a lattice option for the 'scales' parameter at a global level - changes have
to be made in each function call. For example, consider the following code:
library(lattice)
library(latticeExtra)
# Create some data
temp <-
2007 Jun 19
3
Controlling text and strip arrangement in xyplot
I've searched the archives and read the xyplot help but can't figure
out the 2 lattice questions below?
Consider:
library(lattice)
DF <- data.frame(x=rnorm(20), y=rnorm(20), g1=rep(letters[1:2], 10),
g2=rep(LETTERS[1:2], each=10),
g3=rep(rep(letters[3:4],each=5),2))
xyplot(y ~ x | g1 + g2, groups=g3, data=DF)
1) Is there a way to get one strip per row and column
2009 Oct 08
1
xyplot#strips like ggplot?
Dear all,
I want to split the strips in xyplot and push them into the margins ...
Tried to find this in common documentation (such as Deepayan's book) on
lattice ... but so far without success ...
Here is the situation:
xyplot(Speed~Count|Lane*Day,...)
where Speed and Count are numeric, Lane and Day are factors.
By default, this makes a double strip on top of each graph. I can change
2013 Feb 22
3
Help xyplot
Hi Mackay and anybody
(a) Is it possible to select randomly (let say five grids) and plot?
(b) Is it possible to plot five nearest grid in one figure?
The original question and improved codes:
#I am ploting gridded time series data. I would like the actual lat
#and lon value appear on the graph-if possible inside the graph as
#numbers. If there is also more elegant ways to plot the graphs I
2009 Sep 19
3
Lattice: combine the same strip?
Hello R helpers,
I am producing a figure with dual strips, i.e., x~y | S1 + S2, where S1 and
S2 are two strips. For example, in figure 2.1 at
http://lmdvr.r-forge.r-project.org/figures/figures.html.
In this case, I would like to combine the the top strip, since all three
pictures in the same row have the same level based on the first strip. In
other words, instead of
| -- S11 -- | -- S11 -- |
2013 Dec 13
1
data point labeling in xyplot
Hi Folks,
I have data with a format like:
ID y param1 param2 groupingFactor1 groupingFactor2.....
1 ...
1
1
1
2
2
2
2
3
3
3
so several grouping factors and repeated measures. I am using trellis
and xyplot to get plot with several grouping factors.
something like xyplot(y~x|grouping1*grouping2, data=na.omit(mydata),
panel=function{panel.xyplot(x,y);....}); Lets say x is the
2013 Feb 15
3
lattice 3x3 plot: force common y-limits accross rows and align x-axes
Good afternoon,
I would like to ask for help in controlling y-axis limits and labels in
lattice doplots. Unfortunately, the problem is somewhat convoluted,
please bear with the long explanation.
I would like to create a 3x3 lattice of dotplots, say subject ~ count.
The plot is conditioned on variables treatment and risk: subject ~ count
| treatment + risk. In the experiment, not all subjects
2008 Aug 25
1
lattice : using both strip and strip.left
Dear all,
I'm routinely using lattice and ggplot2, I wish to create a lattice
theme that looks not too dissimilar to ggplot's defaults so I can
include both graphs in a document with a consistent look.
To illustrate my questions, consider the following example:
> library(ggplot2)
> library(lattice)
>
> # example data
> x <- seq(0, 10, len = 100)
> y1 <-
2011 Nov 21
1
Lattice graph help
Hi all
I hope you might help me with some aspects of producing a graph in lattice. There are three things I have struggling with and that is: 1. to separate the horizontal box rows from each other; 2. to change the colour of the horizontal and vertical strips to white; and 3. to place the axes labels on the left y axes and on the bottom x axes. I would really appreciate some help. I have put the
2010 Mar 31
1
strip.custom with strip on left for three conditioning variables
I want to use a strip.custom as with useOuterStrips for three conditioning
variables.
useOuterStrips restricts this to only two conditioning variables, and I
cannot figure out
how to write strip.custom properly to do this.
library(lattice)
mtcars$HP <- equal.count(mtcars$hp)
#with two factors
x2<-xyplot(mpg ~ disp | HP + factor(cyl), mtcars)
useOuterStrips(x2)
#with three factors
2012 Jun 25
1
combineLimits and Dates
I'm having some trouble using the latticeExtra 'combineLimits' function
with a Date x-variable:
require(lattice)
set.seed(12345)
dates <- seq(as.Date("2011-01-01"), as.Date("2011-12-31"), "days")
dat <- data.frame(d = rep(dates, 4),
g = factor(rep(rep(c(1,2), each = length(dates)), 2)),
h =
2009 Mar 23
1
lattice multipanel strip placement - with two factors
Hi,
I'm making a multipanel lattice densityplot figure with 2 factors (3 and
20 classes in each factor) with the following statement (the
type="percent" is there to prevent plotting the actual points which
detract from the figure - is there another way of doing this?):
densityplot(~End-Begin | Type * Chromosome, data=Mon, layout=c(5,12),
xlab="Element
2013 Sep 19
3
lattice: double y - problem changing axis color after doubleYScale
Hi,
I have had some troubles using doubleYScale. No matter what I try, I cant manage to change the color of the y-axis in the end. I have to produce a black and white plot. There is also something I do not understand regarding fontfamilyj="serif" when using it in:
strip=strip.custom()
Maybe someone has a better idea for defining which line and dots belong to which y-axis when not using
2009 Aug 20
1
lattice xyplot strip colors and location
Hi all,
I've been trying (unsuccessfully) to modify an xyplot I created using the lattice package. I would like to change default strip colors and locations.
I started with numeric data in 4 columns, which look like this:
0.25 2 1 32
0.25 2 2 30
0.25 2 3 27
0.25 2 4 23
0.25 2 5 17
0.25 3 1 30
0.25
2007 Jul 10
4
type III ANOVA for a nested linear model
Hello,
is it possible to obtain type III sums of squares for a nested model as
in the following:
lmod <- lm(resp ~ A * B + (C %in% A), mydata))
I have tried
library(car)
Anova(lmod, type="III")
but this gives me an error (and I also understand from the documentation
of Anova as well as from a previous request
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/64477.html) that it is
2012 Apr 08
2
xyplot() does not plot legends with "relation=free" scales
Hi all,
I have this problem with lattice that xyplot() won't draw some of my axis labels if the type (i.e. the relation argument) of scales is set as free. For example, in the plot below, I would want it to also show:
1. the labels E1,...E6 below the 10th panel (i.e. 3rd row, 2 col)....just as it is now done below the 12th panel....
2. as well as the labels (2,4,6,8) on the top of panels 1
2013 Feb 20
2
xyplot help
I am ploting gridded time series data. I would like the actual lat and lon value appear on the graph-if possible inside the graph as numbers. If there is also more elegant ways to plot the graphs I will appreciate more suggestions.
#################################
library(ggplot2)
library(lattice)
month <- c("Jan", "Feb", "Mar", "Apr", "May",