[R] Two variables on one lattice barchart
jimdare
jamesdare26 at gmail.com
Mon Mar 30 01:46:25 CEST 2009
Don't worry everyone, I've solved it. See the code below:
Schart<-barchart(Catch~Year,data=SNA,
scales=list(col = "black", tck = c(1, 0),x=list(rot=45)),
panel = function(x, ...) {
panel.barchart(x, ...)
panel.xyplot(x,SNA$TACC,type='o',lwd=3,col="black")
})
jimdare wrote:
>
> Hi,
>
> I created the barchart below using the lattice package, however I can't
> seem to find a way to add another variable as a line (see the desired
> square/lines that I drew for the last 10 years of the plot). Can anyone
> help me with this? Your help is much appreciated!
>
> Code:
>
> Schart<-barchart(Catch~Year,data=SNA, scales=list(col = "black", tck =
> c(1, 0),x=list(rot=45)))
>
> http://www.nabble.com/file/p22772314/eg.gif
>
--
View this message in context: http://www.nabble.com/Two-variables-on-one-lattice-barchart-tp22772314p22774266.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list