Skip to content

line argument in mtext for axis ?

5 messages · Daren Tan, Uwe Ligges, Annette Heisswolf

#
Is there a similar argument for axis that controls the position of
labels via line argument in mtext ?
#
Daren Tan wrote:
At least in my version of the help page of mtext() everything about that 
is described. What is your problem with ?mtext and the "line" argument?

Uwe Ligges
#
Previously, I wasn't aware that axis() supports "las" arguments, and
as a result, I used axis() for the ticks and mtext() to rotate the
labels perpendicular to the axis. Now, I hope to cleanup my codes by
combining the axis() and mtext() codes into a single axis(), the only
issue is that much of my mtext() codes set the "line" argument to some
values. The "line" argument in axis() doesn't work the same way
according to the help page, is there an equivalent argument in axis()
that functions identically to the "line" argument in mtext() ?


2009/4/6 Uwe Ligges <ligges at statistik.tu-dortmund.de>:
#
Hei,

As far as I understand your question, you might want to check the settings of par(mgp), which has three elements. According to ?par mgp sets 
  "The margin line (in mex units) for the axis title, axis labels and axis line. Note that mgp[1] affects title whereas mgp[2:3] affect 
axis. The default is c(3, 1, 0)." According to ?axis the value of par("mgp")[2] is used to place the tick labels. Thus, changing the default 
to the value of your choice might do what you want.

Hope that helps,
Annette

Daren Tan schrieb:

  
    
#
Thanks, I should learn to read deeper into the help page next time. :)

On Mon, Apr 6, 2009 at 4:56 PM, Annette Heisswolf
<annette.heisswolf at utu.fi> wrote: