Skip to content
Prev 29604 / 63424 Next

axis() ignores supplied value of argument mgp[3]?

Prof Brian Ripley wrote:
I'm afraid I read the help closely several times and did not find that
implication.
Which is still useful functionality --- easier to supply a single value
than to change one element of a 3-element vector.
That was my best attempt to interpret the phrase "relative placing of
... tick labels", given that no graphics parameter is explicitly
documented as having that meaning.
To summarize (if I now understand things correctly): when the position
of the axis line is determined by the value of mgp[3], then mgp[2] is
the absolute position (number of lines into the margin) of the tick
labels; but if the position of the axis line is determined by the 'line'
or 'pos' arguments of axis(), then mgp[2] is the relative position of
the tick labels (number of lines between the tick labels and the axis
line).  If this is the intended behaviour, then certainly I think it
would be helpful if it were explicitly documented.


J. R. M. Hosking