Displaying 20 results from an estimated 4000 matches similar to: "Adding reference lines to xyplot"
2003 Jul 14
2
Multipanel weighted regression lines.
Dear R-users,
I am trying to create a multipanel scatter plot which displays weighted
regression lines for each subgroup. I am having diffuculty figuring out
how the Trellis multipanel plotting functions work, in general. Does
someone know where there are some beginners examples on how to create
and use panel.xxx functions in conjunction with the xyplot functions?
Back to the matter at hand
2004 Dec 15
0
Re: [S] using Hmisc and Design library
sorry, I had a typo there, it's datadist(b) for the
analysis of data frame "b".
--- Robert Balshaw <Robert.Balshaw at syreon.com> wrote:
> Not sure if this will help, but did you mean to use
> datadist(a) for
> the analysis of B?
>
> Rob
>
> > -----Original Message-----
> > From: r-help-bounces at stat.math.ethz.ch
> >
2013 May 02
3
Lattice xyplot multipanels
Derar Rxperts,
I have a strange situation.. I see curly brackets around "strip.levels" in
multipanel strips while using lattice::xyplot. .How do I get rid of the
curly brackets? For some reason, I am not able to reproduce the problem
using an example below...
Any suggestions are highly welcome!
Thanks,
Santosh
q <-
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 May 20
2
Function as.Date leading to error implying that strptime requires 3 arguments
I'm using R V 2.2.1. When I try an example from the as.Date help page,
I get an error.
> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")
> z <- as.Date(x, "%d%b%Y")
Error in strptime(x, format) : 2 arguments passed to 'strptime' which
requires 3
>
Any suggestions would be appreciated.
Thanks,
Rob
2005 Oct 21
3
Problems with example(Grid) in grid package
The following:
library(grid)
grid.newpage()
example(Grid)
has the yaxis label partly cut off and the x axis label does not appear at all.
Also ?grid.multipanel in that example brings up documentation for
grid-internal but this would not seem to be internal if its part of an example.
I am using:
> R.version.string # Windows XP
[1] "R version 2.2.0, 2005-09-20"
2011 Jan 09
1
Rectangle height in lattice xyplot key
Dear All
I have a problem with the height of the boxes in the key in the following.
(The text is over 2 lines to accentuate the problem of no space
between the rectangles.)
Is there an easy way to put a space between the rectangles; size
controls the width but there appears to be nothing for the height?
xyplot(1~1,
key = list(corner = c(0.8,0.8),
2010 Jun 02
1
lattice, xyplot, using "panel.segments" by just addressing one panel
Hi R experts,
I'm using the xyplot function in lattice to draw a multipanel plot consiting
of 5x6 scatterplots.
Now I need to link single points in each of those scatterplots (=panel),but
the points, that need linking are different for each panel.
I tried to use the panel.segments function for that, but I can't address
each panel separately. Links right for panel 1, show up in all other
2009 Aug 06
1
specify lattice black-and-white theme
Is there a simple way to specify a theme or trellis (lattice) parameters so
that, in a multipanel (conditioned) plot, there is no color and in the
strips there is no shading? This is the effect achieved on page 124 of
Deepayan Sarkar's "Lattice" (figure 7.2).
I managed to trick lattice into making a grayscale plot on my interactive
display as follows:
> graphics.off()
>
2004 Apr 25
1
multipanel display of levelplots?
I cannot achieve a multipanel display of several levelplots. Here is
part of my code.
At first, create the layout:
push.viewport(viewport(layout=grid.layout(1, 2)))
Then for the left panel:
push.viewport(viewport(layout.pos.col=1,layout.pos.row=1))
push.viewport(viewport(width=0.6, height=0.6))
levelplot(z~x*y, grid)
pop.viewport()
Similar code for the right panel.
However, there is always
2002 Oct 09
1
Summary Orthogonal Polynomials
As usual, the R newsgroup set me straight (thanks to Douglas Bates, Robert
Balshaw and Albyn Jones).
There is really no difference between using orthogonal polynomials of the
form:
Linear -3 -1 1 3
Quadratic 1 -1 -1 1
Cubic -1 3 -3 1
Versus
> poly(c(1:4),3)
1 2 3
[1,] -0.6708204 0.5 -0.2236068
[2,] -0.2236068 -0.5 0.6708204
[3,] 0.2236068
2008 Feb 08
2
xyplot and lsegments
Hi,
How might I use xyplot to plot segments where the segments are in the
input data? (ie a directed acyclic forest).
Here's an example in base graphics:
n = data.frame(id = c(1,2,3,4), parent = c(0,1,2,2), value =
c(5,5.5,7,3), date = c(1,2,3,3.5))
plot(n$date, n$value)
do.call(
segments,
with(
merge(n,n,by.x="parent", by.y="id"),
2006 Jun 26
1
About filled.contour function
Dear R-projects users
I would like like to ask if there is any way to produce a multipanel plot
with the filled.contour function. In the help information of filled
contour it is said that this function is restricted to a full page
display.
With kind regards
Prodromos Zanis
--
****************************************************
Dr. Prodromos Zanis
Centre for Atmospheric Physics and
2013 Jun 24
2
Dibujar rectas sobre varios un grafico multipanel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Estimado Javier, adjunto el grafico retocado con GIMP, borre las lineas
que sobran en cada panel. Obviamente, no es la idea hacerlo de este
modo, sino con R, pues quiero cambiar el color de la recta y hacer
varios otros graficos, cuya edicion manual requeriria mucho tiempo.
Espero entiendas mejor mi explicacion ahora. Cada una de esas rectas es
un
2009 Jun 25
2
Placing text outside graph boundary
Hello,
Is possible to place a label on a multipanel figure outside the boundaries of any single one of the existing graphs in a panel?
Specifically, I have a function that creates a panel with quartz() and then fills it with 6 graphs consisting of exactly the same plot for 6 different groups. I would like to add one title for the entire figure at the top of the figure, but I cannot figure out
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
2003 Mar 10
2
Biplots
I want to plot biplots. I have seen the function biplot, but there are
some extra features I would like, that I do not know how to achieve.
1. My observations, and my variables, fall into groups. Is there a way to,
say, plot the observations in several different colours, according to
which group the observation falls into? Similarly with the variables? I am
used to the lattice idiom, in which one
2017 Aug 02
3
switch of cex adjustment with mfrow?
Dear list members,
i am trying to create multiple figures with identical layout (i.e. font sizes etc.) for a publication created with Latex. To do so (i.e. to get identical font sizes) I save all plots as a pdf with widths and heights as they would later appear in the paper (to prevent scaling etc.). My problem now is that I create several multipanel plots with par(mfrow=c(...)) which sometimes
2013 Jun 24
3
Dibujar rectas sobre varios un grafico multipanel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Estimada comunidad, tengo que hacer un grafico con 4 paneles (4 graficos
pegados juntos) y sobre este tengo que dibujar 4 rectas ajustadas a los
datos de cada panel. Intente hacerlo con lattice usando el siguiente
codigo :
library(lattice)
library(latticeExtra)
xYplot(Cbind(mf[,3],mf[,5],mf[,6])~dia|factor(sol),data=mf,xlab="Time
2010 Aug 30
1
lattice: limits in reversed order with relation="same"
Hi everybody,
I want an x-axis which has xlim=c(max, min) rather than xlim=c(min, max)
in order to reflect the type of the process (cooling):
library(lattice)
myprepanel <- function(x,y,...) list(xlim=rev(range(x)))
x <- rep(1:10, 100)
z <- factor(sample(10, 1000, T))
y <- rnorm(1000, x, as.numeric(z))
xyplot(y~x|z, scales=list(x="free"), prepanel=myprepanel)
This works