Re: [R] Getting tick positions

From: Paul Murrell <>
Date: Wed 22 Jun 2005 - 08:28:17 EST


Uwe Ligges wrote:
> Jim Lemon wrote:

>> Thanks for the answers - I should have been more specific as I had 
>> already tried axTicks and pretty.
>> The function in question is gantt.chart() in the latest plotrix 
>> package (Thanks to Scott Waichler for the original code). I settled on 
>> axis.POSIXct as it seemed the most appropriate for this function, but 
>> couldn't find a way to get the positions of the ticks so that I could 
>> then draw grid lines along the months|days|hours. While the trick of 
>> copying the original function works, I wondered why the axis* 
>> functions don't return the tick positions as barplot returns the bar 
>> positions. Is there any reason not to return "z", or is it just 
>> historical?

> I think historical.
> Replacing
> return R_NilValue;
> by
> return at;
> in do_axis (plot.c) should do the trick (well, I'm a bit afraid
> concerning the UNPROTECT, you might need to do that later, after the
> recording stuff?).

Thanks for the suggestion Uwe (you were right about the UNPROTECT). This change is now in the development version of R.


Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
New Zealand
64 9 3737599 x85392

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Wed Jun 22 08:31:15 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:56 EST