[R] Lattice xyplot with two y axis

taz9 alienz747 at gmail.com
Tue Apr 14 16:33:46 CEST 2009


Hi All,

I have some data which needs to be plotted with lattice.

library(lattice)
cars <- c(0.1, 0.3, 0.6, 0.4, 0.9)
trucks <- c(0.2, 0.5, 0.4, 0.5, 0.1)
drivers<-c(121,145,167,200, 210)
year<-c(2005,2006,2007,2008,2009)
type<-c("local","local","foreign","foreign","foreign")
xyplot(cars+trucks~year|type, data=df3, type="o")

Basically, I need to show "drivers" as well on a secondary y-axis. Is this
possible with lattice and xyplot?

Any ideas and help would be much appreciated. Thanks.
-- 
View this message in context: http://www.nabble.com/Lattice-xyplot-with-two-y-axis-tp23040657p23040657.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list