Displaying 20 results from an estimated 10000 matches similar to: "Syntax for lattice scales argument with |a*b"
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 Apr 05
2
Arrangement of Lattice Histograms - Top to bottom and then left to right?
Hi List,
Using Lattice, I have created a plot of histograms showing Fork Length by
Year. The plot shows the histograms in 3 columns and 5 rows. Using the
as.table=T function I can get the years to start on top. However, what I
would like to do is have the first year start in the top left (column 1, row
1; as it is now) and add the subsequent histograms to the plot going down
the column and then
2011 May 04
3
best subset regression in R
Dear All,
Could someone please give some advice the way to do linear modelling via best subset regression in R? I'd really appreciate for your kindness.
Thanks,
Kagba
[[alternative HTML version deleted]]
2011 May 17
1
scales argument in bwplot (lattice)
Suppose I have data such as the following
set.seed(12345)
tmp <- data.frame(var1 = rnorm(100), var2 = rnorm(100), var3=rnorm(100, 10, 30))
tmp1 <- data.frame(vars = with(tmp, c(var1, var2, var3)), type = gl(3, 100))
var3 is on a different scale, but I create the following plot, which looks terrible as a result
bwplot(~ vars|type, tmp1,
layout = c(1,3),
)
Of course, I can
2009 Aug 11
2
Varying x-axis labels in lattice
Dear Group:
I want to use lattice with a formula such as y ~ x | v to plot a data
frame in which v varies to indicate which "x" is really being plotted.
I know how to make the x-axis scales vary with the panel but is it
possible to let the x-axis label vary, i.e., to let the user specify a
vector of x-axis labels?
Thanks
Frank
--
Frank E Harrell Jr Professor and Chair
2005 Feb 19
1
scales argument in lattice plots
I'm using R 2.0.1 under windows XP. I'd like to produce an xyplot with
lattice, in which the x axis shows normally (with tics and numbers), but
there are neither tics nor numbers for y. (I'm using layout=c(1,10),
and ylab="".)
From the html help for xyplot, it appears I need to use the scales
argument, but I don't fully understand the description there, about
how to
2011 Jun 01
2
lattice panel fine control
Hello R experts,
what follows is my reproducible example:
mydata<-structure(list(ped.avg = c(335.9, 110.8, 645.7, 638.9, 1468.1,
126.4, 4811.1, 88.5, 868.5, 656.6, 723.6, 654, 2.8, 15, 14.2,
17.5, 15.4, 112.1, 424.7, 18.3, 19.9, 28.6, 25.6, 23.5, 15.4,
27, 62.1, 15.6, 74.6), ped.erst = c(96, 53.2, 615.2, 616.5, 512.9,
56.2, 1851.8, 57.1, 579.5, 613.2, 601.1, 613.6, 1.3, 6.3, 6.5,
6.1,
2009 Jul 09
2
Lattice xyplot: same scales within one factor
I am using R 2.8.1 and lattice to produce xyplots conditioned on
two factors. What I would like is to have the scales be free between values
of one factor, but some within. Thus, in the example:
xyplot(mpg ~ disp | factor(gear) + factor(cyl), mtcars,
scales=list(x=list(relation="free")))
rather than having the x scales be free within a gear as well, I want it to
be the same for
2007 Oct 09
2
lattice/xyplot: horizontal y-axis labels with scales(relation="free")
I would like to create an xyplot with varying y-axis limits and horizontal labels at the y-axis tickmarks.
The following does not seem to work, although I think it should, going by the documentation for par.
R version 2.5.1, Windows XP Prof.
Thanks for a clue.
Andreas Krause
library(lattice)
# axis labels for y-axis are horizontal
xyplot(Sepal.Length ~ Sepal.Width | Species, data=iris)
#
2010 Nov 06
1
Prettier axis labels when using log scales in Lattice
Hello,
I am trying to alter the way in which lattice functions (specifically xyplot) print the axis labels when one uses the 'scales' parameter.
I can obtain the effect I want by using
scales=list(y=list(log=10, labels=expression(yvalues)))
where yvalues are the values that would have been printed as the y-axis labels if the "labels" argument had not been present. To help
2009 May 16
1
Lattice scales question: using "at" when log = TRUE
All,
I have a simple lattice plot where I have set log = TRUE for the y scale.
When I attempt to change the tick locations via the "at" argument within
scales, the supplied numeric vector is not followed. Any suggestions much
appreciated for the example below:
y = c(10^1.5, 10^2, 10^3, 10^2)
t = c(1,2,3,4)
xyplot(y ~ t, type = "b", scales = list(y = list(log = TRUE)))
##
2007 Jul 30
1
duplicate DATE at in lattice scale handled differently from base graphics OR lattice numeric scales
When at, label chains contain duplicate at values, axis ticks are
dropped. I believe this is handled incorrectly for Date ats in
lattice 0.15-4 when compared to how it is handled for numeric, or for
dates in base plot. This can result in mis-labelled axes in some
circumstances. I have included executable examples.
R: 2.5.0
numeric base plot:
plot(1:10, axes=F); axis(1, at=c(2,4,4,6),
2008 Feb 05
1
Inconsistent lattice scales$x$at,label behaviour for POSIXct
I have encountered the following behaviour in lattice in 2.6.1 (and
2.4.0) which differs depending upon the type you use. I believe the
numeric behaviour to be correct, and the POSIXct behaviour to be in
error.
When the x data and x axis in a lattice graph are POSIXct, and when
using scales$x$at and scales$x$labels to add custom labels:
If the first visible at value is not the first
2010 May 24
1
lattice 'scales' option help
Hi All,
I'm trying to draw boxplots. I'm having a hard time to get "ticks labels" on
multiple panels using 'alternating' option.
# R Code:
# May not be the best example, please just look into 'scales' option
library(lattice)
data(OrchardSprays)
dta <- subset(OrchardSprays, OrchardSprays$rowpos %in% c(1,2,3))
# Original
# This works fine, as you can see
2011 Mar 26
1
bwplot [lattice]: how to get different y-axis scales for each row?
Dear expeRts,
How can I get ...
(1) different y-axis scales for each row
(2) while having the same y-axis scales for different columns?
I coulnd't manage to do this with relation="free" [which gives (1) but not (2)].
I also tried relation="sliced", but it did not give the same y-axis scales
within each row (see the fourth row). Further, it "separates" the
2005 Aug 14
1
Labels on axes with log scales with lattice
I using lattice to make some plots and I want to make the y-axis on
some of these plots use a log scale. In the following plot:
x <- 1:10
y <- 2^x
xyplot(log10(y) ~ x)
I get tick marks on the y-axis at 0.5, 1.0, 1.5, 2.0, 2.5, and 3.0. I
would rather have just 3 tick marks at 1.0, 2.0, and 3.0 but labeled
10, 100, and 1000.
I know this can be done using the "at" and
2004 Feb 10
1
lattice: scales beginning at zero with relation="free"
Is there an easy way to have scales beginning with zero and
ending with the local maximum data value of each panel
when using a lattice function with ``scales=list( relation="free" )''?
Thanks. Wolfram
2004 Dec 03
1
Difficulty implementing "scales" in a lattice plot
Hello all,
I am rather new to lattice and have a simple question regarding formatting text labels on the axes. I have looked through my own archive on lattice notes, searched and examined 30 or so hits on Dr. Baron's search site, looked through my MASS book, my Data Analysis and Graphics Using R book, R news articles, and I have in my hand the lattice package instructions and have read and
2006 Oct 31
1
2.4.0 and lattice 0.14-9: Changed behaviour of scales-argumenttck
Dear list,
I have observed a change in the behaviour of the scales-argument tck of
xyplot() after having installed R 2.4.0 (for version info see below).
The help page of xyplot() says about the scales-argument tck:
'tck' numeric to control length of tick marks. Can be a vector
of length 2, to control left/bottom and right/top separately.
But if I issue
xyplot( y ~ x, scales=
2005 Jun 01
2
problem with chron scales in lattice
I can't get the scales parameter in xyplot of lattice to work as I
expected. I'm using R-2.1.0 and lattice 0.11-8. There should be year
labels from 1992 to 2004 for the x axis in the plot below, but instead
only a few of them appear, and in the wrong spots, as if the coordinate
system has changed after finishing with the panel function.
library(chron)
library(lattice)
# vertical grid