[R] tick marks: 0, 12, 24, 36 ...

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Oct 6 21:28:20 CEST 2003


On Mon, 6 Oct 2003, Spencer Graves wrote:

> Hopefully, someone who knows will answer.  In case that won't happen, 
> I'll tell you what I would do that would likely produce the desired 
> result fairly quickly -- but longer than it would take me to test it: 
> 
> 1.  class(KM) = "survfit". 
> 
> 2.  methods(plot) includes "plot.survfit". 
> 
> 3.  ?plot.survfit reveals options I don't fully understand.  I'd work 
> the examples and experiment to see if I could do what I wanted easily 
> with the existing function. 
> 
> 4.  If that didn't work, I'd list "plot.survfit", copy it to a file, 
> find the "plot" command, and add "axes=FALSE" to the argument list.  I'd 
> follow that with "axis(1, ...)" to add the x-axis I want and "axis(2)" 
> to add the default y axis. 

axes=FALSE is an argument of plot.default, but not other methods.
The par arguments xaxt and yaxt are the general ways to supress the 
plotting of axes.

>       This general approach has worked in other contexts, so I believe 
> something like this would likely work here. 


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-help mailing list