[R] Title for secondary y-axis (axis(4)) in barplot?
Rainer M KRug
RMK at krugs.de
Mon May 15 10:37:51 CEST 2006
Hi
I am using the following script to plot a barplot with a secondary axis
in a bargplot for the line.
It works, but I would like to have a title for the secondary y-axis on
the right hand side of the axis - is this possible?
Rainer
RainFog <- read.csv ("Climate.csv", header = TRUE, as.is=TRUE)
PP <- array(c(RainFog$Rain, RainFog$Fog), c(16,2))
M <- paste (RainFog$Month)
png(filename="RainFog.png", width=960)
barplot (t(PP), ylim=c(0,8),names.arg=M, space=0.3, ylab="precipitation
in mm")
lines (seq(0.8,20.3, by=1.3), RainFog$Rel.Hum./10, type="o")
axis (4, at=seq(0, 8, by=2), labels=seq (0, 80, by=20))
dev.off()
More information about the R-help
mailing list