[R] xyplot (lattice), strip.default
Wladimir Eremeev
wl at eimb.ru
Tue May 6 10:23:36 CEST 2003
Dear r-help,
I've got data of the following structure
1979 93.428747 0
1979 87.298608 20
1979 78.506340 40
...
1979 45.567890 340
1980 60.815289 0
1980 49.630904 20
1980 24.981362 40
...
The first column is year and the last one is the longitude.
I need a set of graphs showing the dependence of the middle value on
the longitude, for each year, situated one blow the other.
I.e.
1979: --...---```--``--..
1980: ...--``../``\...---
...
etc.
Here characters ---...---``` denote the curve.
The middle value is on the vertical axis
and the latitude is on the horizontal axis of each graph.
To do this I use xyplot function from the Lattice package:
xyplot(ac15$"value"~ac15$lon|year,data=ac15,
type="l",
layout=c(1,24),
xlab="Longitude",
as.table=TRUE,
bg="white"
);
But I have some problems using it.
Questions:
1. How to make xyplot to draw the year value in the strip above each
graph instead of writing the word 'year'?
2. I'd like to produce a .png file with graphs without drawing them on
the screen.
I try:
png(filename = "Rplot.png", width = 480, height = 1024, pointsize = 12,
bg = "white");
trellis.device(device=getOption("png"),
color = FALSE,
bg = "white" );
xyplot.... [see above]
But I get the error message:
Error in trellis.device(device = getOption("png"), color = FALSE, bg = "white") :
couldn't find function "device.call"
Where's the problem?
I use R 1.7.0 and Windows NT 4.0 workstation.
Thank you for attention and help!
--
Best regards
Wladimir Eremeev mailto:wl at eimb.ru
==========================================================================
Research Scientist Leninsky Prospect 33,
Space Monitoring & Ecoinformation Systems Sector, Moscow, Russia, 119071,
Institute of Ecology, Phone: (095) 135-9972;
Russian Academy of Sciences Fax: (095) 954-5534
More information about the R-help
mailing list