[R] Getting tick positions
Paul Murrell
p.murrell at auckland.ac.nz
Wed Jun 22 00:28:17 CEST 2005
Hi
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.
Paul
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/
More information about the R-help
mailing list