Skip to content
Back to formatted view

Raw Message

Message-ID: <22774266.post@talk.nabble.com>
Date: 2009-03-29T23:46:25Z
From: jimdare
Subject: Two variables on one lattice barchart
In-Reply-To: <22772314.post@talk.nabble.com>

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.