[R] Trellis barchart help
jimdare
jamesdare26 at gmail.com
Fri Mar 27 01:11:54 CET 2009
Hi,
I apologise if this sounds like a really simple problem. I have a
time-series data set with two columns of data: Catch and TACC. I want Catch
plotted as a barchart and TACC plotted on the same graph as a series of
points with an overlaying a line. I have created the code for a barchart
using the Catch data but I can't seem to figure out how to add the TACC data
as a line. Can someone please enlighten me?
Regards,
James
Barchart code:
Schart<-barchart(Catch~Year,data=SNA,
scales=list(col = "black", tck = c(1, 0),x=list(rot=45)),
par.settings = list(axis.line = list(col = "transparent")),
axis = function(side, ...) {
if (side == "left")
grid.lines(x = c(0, 0), y = c(0, 1),
default.units = "npc")
else if (side == "bottom")
grid.lines(x = c(0, 1), y = c(0, 0),
default.units = "npc")
axis.default(side = side, ...)
}
)
--
View this message in context: http://www.nabble.com/Trellis-barchart-help-tp22733771p22733771.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list