Skip to content

Horizontal Y axis title above the y axis

4 messages · Andres Christian, Duncan Murdoch

#
On 24/11/2011 9:25 AM, Andres Christian wrote:
The parameter to mtext is just called "font", not "font.lab".  It is 
called font.lab in other functions because the have multiple types of 
text, and that's the one that is used for labels.

So this works:

mtext("Yield [kg/ha]", side=3, adj=0, font=2)


Duncan Murdoch
pl
#
Dear Duncan

Thanks for your help.

However, your suggestion still does not solve my problem because mtext() only allows me to put the text at the beginning of the Y axis (adj=0), but not centered above it, because values below 0 are not permitted for the parameter adj.

Best regards
Christian

___________________________________
Mr Christian Andres
MSc ETH Agr

Research Institute of Organic Agriculture (FiBL)
International Division
CH-5070 Frick, Switzerland 
Phone: +41 (0)62 865 7216??????
E-mail: christian.andres at fibl.org


-----Urspr?ngliche Nachricht-----
Von: Duncan Murdoch [mailto:murdoch.duncan at gmail.com] 
Gesendet: Donnerstag, 24. November 2011 16:02
An: Andres Christian
Cc: R-help at r-project.org
Betreff: Re: [R] Horizontal Y axis title above the y axis
On 24/11/2011 9:25 AM, Andres Christian wrote:
The parameter to mtext is just called "font", not "font.lab".  It is called font.lab in other functions because the have multiple types of text, and that's the one that is used for labels.

So this works:

mtext("Yield [kg/ha]", side=3, adj=0, font=2)


Duncan Murdoch
pl
#
On 24/11/2011 10:08 AM, Andres Christian wrote:
Use the "at" parameter.

Duncan Murdoch