Displaying 20 results from an estimated 2000 matches similar to: "Lattice: distance of Y-axis label from plot"
2011 Jul 21
6
Lattice: place ticks only on y-axis
I am using lattice for a bar plot, having a little trouble removing ticks,
tick labels from x-axis, but keeping them on the y-axis. I looked around
quite a bit (http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1733.html, help
pages, etc), tried variations of "scales = list(alternating = c(0,0)",
"scales = list(alternating = c(0,0), tck = c(0,0))" and others, couldn't
quite
2011 Jul 11
3
Stacked bar plot of frequency vs time
Hi All,
New to R, but committed. I looked in a number of places but can't figure out
my current problem. I have date of the type:
Time Type1 Type2 Type3
1 .50 .25 .25
4 .55 .25 .20
5 .65 .20 .15
etc
which describe the frequency of types 1, 2 and 3 (adding up to 100%) over
time. I would like to create a stacked bar chart showing these
2003 Oct 19
2
problem with win.metafile( ): traceback()
For the first error message:
> win.metafile(file = "//.../plot1.wmf",
+ width = 8.5, height = 6.25)
> lset( list( background = list(col = "white")))
Error in get(x, envir, mode, inherits) :
variable "win.metafile://.../plot1.wmf" was not found
> traceback()
4: get(device)
3: trellis.device(device = .Device, new = FALSE)
2: trellis.par.get(item)
1:
2009 Apr 28
1
Understanding padding in lattice
Dear R-users,
I am trying to understand what the different padding arguments in
trellis.par.set are exactly controlling the space around lattice plots.
I have used the following code as a basis for testing but it did not
really help me to visualize how the value of each argument changes the
margins and the plotting area. I guess a better way to visualize the
effects of these padding items
2007 Dec 26
1
seekViewport error
Why does the seekViewport at the bottom give an error?
> xyplot(Sepal.Length ~ Sepal.Width, iris, group = Species, col = 11:13,
+ auto.key = TRUE)
> grid.ls(view = TRUE)
ROOT
GRID.rect.89
plot1.toplevel.vp
plot1.xlab.vp
plot1.xlab
1
plot1.ylab.vp
plot1.ylab
1
plot1.strip.1.1.off.vp
GRID.segments.90
1
plot1.strip.left.1.1.off.vp
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 Dec 26
4
lme X lmer results
Hi,
this is not a new doubt, but is a doubt that I cant find a good response.
Look this output:
> m.lme <- lme(Yvar~Xvar,random=~1|Plot1/Plot2/Plot3)
> anova(m.lme)
numDF denDF F-value p-value
(Intercept) 1 860 210.2457 <.0001
Xvar 1 2 1.2352 0.3821
> summary(m.lme)
Linear mixed-effects model fit by REML
Data: NULL
AIC BIC
2007 May 31
4
Aggregate to find majority level of a factor
I want to use the aggregate function to summarize data by a factor (my
field plots), but I want the summary to be the majority level of another
factor.
For example, given the dataframe:
Plot1 big
Plot1 big
Plot1 small
Plot2 big
Plot2 small
Plot2 small
Plot3 small
Plot3 small
Plot3 small
My desired result would be:
Plot1 big
Plot2 small
Plot3 small
I
2008 Sep 19
1
Lines between panels in lattice
Hello,
I have a multi-page display each consisting of two-panels above each
other.
I need to draw a line from the top panel to bottom panel. Using
current.vpTree()
i find that "plot1.panel.1.2.vp" and "plot1.panel.1.1.vp" are the top
and bottom ones respectively.
I am using the following code(inspired by Paul Murrell's R Graphics)
to draw a line.
(All the
2004 Sep 09
2
Skipping panels in Lattice
Dear all,
I wish to generate a lattice boxplot which skips an empty cell in a design.
I have trawled r-help, scruitinized xyplot(lattice) help page, and merrily
reproduced examples of using skip from a couple of previous r-help queries
and the example given in Pinheiro & Bates. But I must be missing something...
Here's an example (running R 1.9.1 on Win2k):
# generate some data
df1
2007 Dec 10
2
Viewport and grid.draw
Hi Deepayan and everyone,
I need to add a common legend to a group of latice
graphs, I have tried different ways using viewport and
grid.draw without success.
Here is what I have:
plot.new()
library(grid)
library('IDPmisc')
print(plot1, split=c(1,1,2,4), more=TRUE)
print(plot4, split=c(2,1,2,4), more=TRUE)
print(plot2, split=c(1,2,2,4), more=TRUE)
print(plot5, split=c(2,2,2,4),
2011 Jul 19
5
multiple plots in single frame: 2 upper, 1 lower
Hi,
par(mfrow = c(2,2))
will create a 2x2 window that I can use to plot 4 diferent figures in:
[plot1 plot2]
[plot3 plot4]
But how can do 3 so that the bottom spans the width of the upper two:
[plot1 plot1]
[p l o t 3]
Is this possible in R?
--
View this message in context: http://r.789695.n4.nabble.com/multiple-plots-in-single-frame-2-upper-1-lower-tp3679574p3679574.html
Sent from the R
2008 Jan 12
2
Lattice equivalent of par(mfrow = )
Dear r-helpers,
Does anyone have a straightforward example of putting together three
unrelated (expect for a common y-axis) xyplot() figures in what would
be in base graphics a par(mfrow = c(1, 3)) arrangement?
_____________________________
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400 Charlottesville, VA 22904-4400
Parcels: Room 102
2007 Dec 11
2
ggplot - Setting the y-scale in a bar plot
Dear All (probably Hadley),
I am now trying to customise some plots using a bar geom.
I do not want to use the default binning statistic, but rather
calculate the bar heigths separately. I do manage this, but for
comparison purposes I would like to have a set of plots all with the
same y-axis height. But I do not seem to find out how to fix the
scale of the y-axis in this case.
Any tips?
2004 Feb 20
1
unexpected postscript output with par(mfg)
Hi, a colleague of mine encountered some unexpected behavior regarding
the postscript output from R. It's difficult for me to tell whether
or not this is an R problem or a ghostview/gv/interpreter problem.
Just to note, I think it's exactly the same situation reported here:
http://finzi.psych.upenn.edu/R/Rhelp02/archive/25436.html
The following code produces a working plot (no
2006 Mar 19
2
tick mark intervals
Hi everyone!
This must be a common question but I have not found an answer to it in the
archives yet.
I am producing four plots with par(mfrow=c(2,2)). The x-axis is the same for
all of them but the y-axis is different.
What I would like to do is to have a different range of the y-axis and
different intervals between tick marks. BUT
I would like to have the same number of tick marks and I would
2008 Jan 25
4
Function for translation of a list into a matrix as used by ordination?
Hello.
Does anyone know of an existing function that takes a list in the form of:
Plot1 Species1 Abundance1
Plot1 Species2 Abundance2
Plot2 Species1 Abundance1
Plot2 Species3 Abundance3
.
.
.
PlotN SpeciesN AbundanceN
and translates into a matrix in the form of
Species1 Species2.... SpeciesN
Plot1 Abundance1 Abundance2... AbundanceN
Plot2 Abundance1
2006 Jun 01
1
how to add point and label to boxplot using bwplot
Hi.
My data contains information for 10 hospitals for 12 different measures.
Let's call it x1-x12. I need to create a boxplot for each one of this
measures and put them into one page. Each plot also needs to be independent,
i.e. cannot use the group feature because of different scales for each
measure. I was successful using the following code:
x1 <- c(1.317604376, 0.978038233,
2009 Apr 08
1
Tinn-R pdf()
Dear R and Tinn-R users,
i recently switched to Tinn-R and sending code to R works fine (R 2.8.1,
Tinn-R 2.2.0.2, OS Windows XP). However, i encountered a problem when
trying to send plots to pdf files like this:
library(lattice)
pdf("plot1.pdf")
PLOT<-(xyplot, ...)
PLOT
dev.off()
The file "plot1.pdf" is created, but it is empty.
If i paste the code above directly into
2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par
command. For example I have 7 plots, but instead of arranging them in
the default way
plot1 plot2 plot3
plot4 plot5 plot6
plot7
I want them in this order
plot1 plot2 plot3
plot4 plot5 plot6
plot7
Could somebody tell me how to do this, please? Thanks so many.
Suyan