[R] hist function+label second y-axis

Jim Lemon jim at bitwrit.com.au
Fri Mar 21 10:50:34 CET 2008


canadiangirl19 wrote:
> Dear Forum,
> 
> hist(x$LAN_3,col="green",xaxt='n',yaxt='n',xlab="",ylab="",main="",type="l")
> I´d like to craete a line not a bar in the hist function, but regrettably I
> get only warning messages:
> 1: Grafikparameter "type" ist veraltet in: title(main, sub, xlab, ylab,
> line, outer, ...) 
> 2: Grafikparameter "type" ist veraltet in: axis(side, at, labels, tick,
> line, pos, outer, font, lty, lwd,  
> 3: Grafikparameter "type" ist veraltet in: axis(side, at, labels, tick,
> line, pos, outer, font, lty, lwd, 
> 
Maybe you want to use "plot" with type="h"

> My second problem is, I´ve created a second y-axis, but I´m not able to
> label this second axis, I try it with:
> axis(3,x$LAN_3,xlab="whatever") but nothing happend.
> 
First thing is that the second y-axis is numbered 4. Second is that you 
will probably have to leave a bit more space with

par(mar=c(5,4,4,4))

in order to fit your axis label.

Jim



More information about the R-help mailing list