Re: [R] Finding the "height of a line of text" for axis

From: Steven J. Murdoch <r+Steven.Murdoch_at_cl.cam.ac.uk>
Date: Thu 31 Mar 2005 - 09:00:12 EST

Thanks for your reply.

On Wed, Mar 30, 2005 at 08:03:10AM -0600, Marc Schwartz wrote:
> or even something like this:
>
> plot(1:5, axes = FALSE)
> axis(1, col.axis = "white", col = "red", tcl = 1)
> axis(1, col.axis = "white", col = "white", tcl = 0)
> axis(2, col.axis = "white", col = "red", tcl = 1)
> axis(2, col.axis = "white", col = "white", tcl = 0)

This is the effect I am trying to achieve. I did try the route of overdrawing in white, but decided against it. The reason I haven't used that, is that firstly I wasn't sure if there would be some rounding error in a printer which would cause the background to appear. Secondly, the end of the ticks look weird due to the different line end types:
 
http://www.cl.cam.ac.uk/users/sjm217/volatile/r-lineend.png

Changing to square caps might help, but I was hoping there would be a nice solution that would let me keep round caps. Any suggestions?

Thank you,
Steven Murdoch.

-- 
w: http://www.cl.cam.ac.uk/users/sjm217/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 31 09:09:34 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:57 EST