You can use the bwplot panel in the HH package.
You might need to install HH first, by uncommenting the line below.



girafe.txt <- textConnection(
"  day   nmgml
1   29 2.72655
2   29 2.48820
3   15 2.85945
4   15 2.58915
5   15 2.88345
6   15 2.66675
7   47 3.29125
8   15 2.44085
9   29 2.43065
10  29 2.43425
11  29 2.42705
12   0 1.12350
13  15 5.10310
14  15 0.99880
15   0 2.22350
16  47 2.18290
17  47 2.21570
18  47 2.46450
19  29 2.53350
20  47 2.78550
21  47 3.06920
22   0 2.65660
23   0 2.16650
24   0 2.20620
25   0 1.91870
26   0 2.45160
27   0 2.35980
28   0 1.99900
29   0 2.16300
30  15 2.00460
31  15 2.56220
32  47 2.38650
33  29 2.65820
34  29 2.47670
35  47 2.23770
36  29 2.40080
37  47 2.12650
38  29 2.35950")
girafe <- read.table(girafe.txt, header=TRUE)
close.connection(girafe.txt)

## install.packages(HH)  ## if you don't already have it
library(HH)

girafe$day <- factor(girafe$day)
position(girafe$day) <- as.numeric(levels(girafe$day))
bwplot(nmgml ~ day, data=girafe,
       scales=list(x=list(limits=c(-5, 53),
                          at=position(girafe$day),
                          labels=position(girafe$day))),
       box.width=5,
       panel=panel.bwplot.intermediate.hh)


There is a bug in the lattice installed with R-2.11.0 that makes it ignore
the
limits argument.  A repair is on r-forge now and will be released soon.
The limits argument works correctly with R-2.10.1.

Another example is on my website
http://astro.temple.edu/~rmh/HH/bwplot-color.pdf

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to