Re: [R] y-label on right hand side of plot

From: Carlos Ortega <coforfe_at_gmail.com>
Date: Thu 31 Mar 2005 - 20:50:22 EST

Hello,

Please check if this is acceptable for you..

par(mar=c(6,6,6,6))
plot(1:10,yaxt="n",ylab="")
axis(4)
mtext('y-label',4,line=2)

Regards,
Carlos.

On Thu, 31 Mar 2005 12:31:49 +0200, joerg van den hoff <j.van_den_hoff@fz-rossendorf.de> wrote:
> Is there a better way than:
>
> par(mar=c(6,6,6,6))
> plot(1:10,yaxt="n",ylab="")
> axis(4)
> text(12,5.5,'y-label',xpd=T,srt=90)
>
> to get the y-ticks _and_ the y-label to the rhs of the plot? I did not
> find anything in the 'par', 'plot', 'axis' and 'title' manpages to
> solve the problem. (the above is ugly, because one needs to hardcode the
> text position or needs to calculate it 'manually' from par('usr'). it
> would be much nicer, if there were a flag to 'title' controlling were
> the labels occur).
>
> thanks
> joerg
>
> ______________________________________________
> 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
>



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 Thu Mar 31 21:04:36 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST