Re: [R] Title for secondary y-axis (axis(4)) in barplot?

From: Rainer M KRug <RMK_at_krugs.de>
Date: Mon 15 May 2006 - 19:30:05 EST

Uwe Ligges wrote:

> Rainer M KRug wrote:
> 

>> 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()
> 
> 
> See ?mtext

Thanks - exactly what I was looking for

Rainer



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon May 15 20:40:41 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 15 May 2006 - 22:10:10 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.