Displaying 20 results from an estimated 6000 matches similar to: "xyplot#strips like ggplot?"
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
2008 Jun 18
1
Custom strips in lattice
I've recently been playing with strip functions for a data presentation I'd
like to use, and have a couple questions. I've cannibalised the
useOuterStrips function from latticeExtra to give me the following sample
code:
library(lattice)
myData <- expand.grid(
type = c('First 3 days','Whole profile'),
sub = paste('Subject', 1:3,
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 <-
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
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 -- |
2011 Oct 20
1
xyplot() or splom()?: two factors from same data frame
I'm not seeing how to plot the quantities associated with two values of a
factor by reading the ?xyplot help page and Deepayan's book. Perhaps I need
to generate many different subsets from the data frame, but that would
require _many_ new data frames.
The structure of the data frame (for a single stream) has sites (factor),
a date (as.Date), parameters (factor), and quantities
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
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",
2010 Jan 10
1
xmlToDataFrame#Help!!!#follow-up
Dieter Menne pointed out that the (small) xml attachment didn't make it.
Here is an in-line version (see end of message). Let's hope it works
this time.
I'm struggling with interpreting XML files created by ADODB as
data.frames and I'm looking for advice.
Note:
This xlm contains a result set which comes from a rectangular data
array. I've been trying to play with
2009 Jun 10
1
ggplot, qplot: alpha channel for colors corresponding to factor
Hi,
I have a qplot like the one in the minimal example below, except I
also have faceting like this:
qplot(jitter(Goodall),jitter(Better.adapt),colour=Second.adapt,facets=~Pol,data=d1)
and with the real data I get quite a lot of overplotting, so I would
like to add an alpha channel.
In addition, I would like to be able to control which colors are used
for each value of Second.adapt (which
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
2008 Jul 10
1
layout is to xyplot as ??? is to qplot
Playing with ggplot, something I'd promised myself I'd get around to. I've
the following scenario:
library(lattice)
library(ggplot2)
myData <- data.frame(
x = rnorm(100),
y = rnorm(100),
group = 1:4
)
xyplot(y ~ x | factor(group), data = myData, layout = c(2, 2))
qplot(x, y, facets = ~ group, data = myData)
In this code the lattice example gives me a 2x2 layout, whereas
2011 Jun 11
0
problems with geom_vline, histograms, scale=free and facets in ggplot
Dear list,
I?m having a little trouble with adding vertical lines to a histogram.
I need to draw a matrix of histograms (using facets), and in each
histogram add a vertical line indicating the mean value of the data in
each facet. According to the last example in the geom_hline help, to
display different lines in each facet I need to provide a data frame.
I modified this example to make a plot
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
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 Dec 22
0
Reshpaing for xyplot() or ggplot()
Dear list,
I have 2 data sets such as:
> head(calib20090730b)
color XR XG XB L1_1 L1_2 L1_3
1 1 87 55 62 116 124.0 100
2 2 164 125 134 204 203.0 153
3 3 118 64 98 157 101.0 139
4 4 65 72 72 102 111.0 135
5 5 142 95 112 176 161.5 133
6 6 89 113 112 125 128.0 195
> head(refpanel)
color B G R NIR1 NIR2
1 1 0.07 0.10 0.17
2010 Aug 26
1
ggplot inside cycle
Dear all
I want to save several ggplots in one pdf document. I tried this
for (i in names(iris)[2:4]) {
p<-ggplot(iris, aes(x=Sepal.Length, y=iris[,i], colour=Species))
p+geom_point(aes(size=3))
}
with different variations of y input but was not successful. In past I
used qplot in similar fashion which worked
for(i in names(mleti)[7:15]) print(qplot(sito, mleti1[,i],
facets=~typ,ylab=i,
2011 Sep 13
3
ggplot - class "character" problem
Hi
I'm trying to use ggplot2 to chart a dataset that I've drawn in from
excel.? When I run the qplot command, I get the following error
message:
Error: ggplot2 doesn't know how to deal with data of class character
It feels like I need to coerce one of the fields in my data frame.
Here's the code, which is short:
#draw data in from network location
2006 Oct 13
3
Adding per-panel text to panel strips in lattice xyplot
I would like to add auxiliary information to the bottom of two strips on
each panel that comes from a table look-up using the values of two
variables that define the panel. For example I might panel on sex and
race, showing 3 randomly chosen time series in each panel and want to
add (n=100) in the bottom strip to indicate the 3 curves were sampled
from 100. Is there a not-too-hard way to do
2008 Jun 17
1
ggplot facet spacing, wrapping
I'm running into some problems with the spacing of some faceted ggplot plots.
I have a number of time series faceted to be one above another, but the
scale labels of the y axes all clobber each other at the bottom/top of each.
for example, try:
qplot(x, y, data = data.frame(x = 1:10, y = 1:10, size = 1:10), facets =
size ~ ., size = size) + scale_x_continuous(breaks = 1:10) +