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

Dirk Eddelbuettel edd at debian.org
Thu Aug 7 15:22:58 CEST 2003


On Thu, Aug 07, 2003 at 07:24:23AM +0100, Prof Brian Ripley wrote:
> I think there is no disagreement in the help, but your experience does
> disagree with my experiments.
> 
>     font: font for text.
> 
>      col: color for the axis line and the tick marks.  The default
>           'NULL' means to use 'par("fg")'.
> 
>      'col.axis' The color to be used for axis annotation.
> 
>      'col.lab' The color to be used for x and y labels.
> 
>     'font.axis' The font to be used for axis annotation.
> 
> Try
> 
> > plot(1:10, col.axis="gold", col.lab="blue", font.axis=3)
> > axis(side=4, at=1:10, col="green", col.axis="gold", col.lab="blue", 
>        font.axis=3, font=2)
> 
> So when calling axis, the colour of the line and the tick marks is set by 
> "col" and that of the labels by "col.axis" and the xlab and ylab by 
> "col.lab".  Three separate components, three colour settings.

Ah, very nice. So all I needed was col.axis. Now that I think about it, I
guess I knew it was mentioned in ?par.
 
> As for fonts, "font" rules when supplied to axis, otherwise "font.axis" is 
> used.
> 
> I'll add a note to axis.Rd.

Very good.

Thanks, Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx




More information about the R-help mailing list