[R] Plot ticks and tick labels: thickness, colour?

Thomas W Blackwell tblackw at umich.edu
Thu Aug 7 00:56:09 CEST 2003


Dirk  -

You can certainly make tickmarks thinner than the axis line by
multiple calls to  axis() with different values for lwd.  MAYBE
you can overwrite an earlier call by setting  col.axis="white"
(and no tickmarks) but I've never tried this.  mtext()  allows
building custom tick labels.

In R-1.7.1,  help("axis")  seems to disagree with  help("par")
on whether the arguments to  axis()  are called "col" and "font"
(as in help(axis)) or "col.axis", "col.lab" and "font.lab"
(as in help(par)).  In my experience,  help(par)  rules.

But, do you REALLY want to get into this !

-  tom blackwell  -  u michigan medical school  -  ann arbor  -

On Wed, 6 Aug 2003, Dirk Eddelbuettel wrote:

> I am displaying several series in one plot, and would like to make
> them distinct without having to employ a legend.
>
> I managed to color tickmarks, but have been unsuccessful with either one of
>
> a) making tickmarks thicker (without increasing the axis at the same time).
>    From reading ?axis:
>        lty, lwd: line type, width for the axis line and the tick marks.
>    in would appear that I cannot obtain the one _without_ the other; or
>
> b) displaying the tick label in a different colour. Again, ?axis reads
>      col: color for the axis line and the tick marks. [..]
>    indicates that I can only set the tick mark, not the annotation.
>
> Thanks in advance,  Dirk




More information about the R-help mailing list