[R] censoring symbols on survfit plot

Patrick Connolly p_connolly at slingshot.co.nz
Sat Feb 19 09:07:04 CET 2011


On Fri, 18-Feb-2011 at 06:01AM -0600, Terry Therneau wrote:

|> --begin included message ----
|> Hi, when ploting Kaplan-Meier estimate curves as below, the censoring
|> symbols
|> (crosses) to not change thickness along the lines 
|> plot(survfit(surv ~ I(x>=cut.off) ),lty=c(1,2), lwd=2)
|> 
|> is there any strightforward way to make it happen? thanks
|> 
|> -- End inclusion ---
|> 
|>  The symbols on the plot are characters, and are controled by the cex
|> parameter.  I don't know how to make a character "thicker" but not

The character will be thicker in a call to points() if the lwd
argument is set to something larger than 1.  I see in plot.survfit
there are quite a few calls to points().  Some or all of those calls
could have an lwd argument that was set somewhere in the call to
plot.survfit, but it would not be straightforward without that
modification.  

The OP could make a local version of plot.survfit with such a change
easily enough.  That's one of the great things about R: you can change
it if it's not quite what you need.  Whether it's a good idea to do
that to the package's own function is a decision for the maintainer.
There could well be occasions where it's not a good idea.

HTH

-- 
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.   
   ___    Patrick Connolly   
 {~._.~}                   Great minds discuss ideas    
 _( Y )_  	         Average minds discuss events 
(:_~*~_:)                  Small minds discuss people  
 (_)-(_)  	                      ..... Eleanor Roosevelt
	  
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.



More information about the R-help mailing list