[R] Problem with axes in a plot of Kaplan-Meier

Terry Therneau therneau at mayo.edu
Fri Jan 6 14:32:53 CET 2012


After changing "involuntarily" some of the graphics parameters with
the command par() (I did not know that changes with this command are
permanent), now when I made a plot of the survival Kaplan-Meier
function, the Y axis does not start at 1, and the X axis does starts
at 0. The commands that I use are:

-------------

  Par command are cumulative PER graphics device.  Your "unfortunate"
par commands would not affect a new plot with pdf() for instance.
I often resort to the simple solution of
	dev.off()  #close the current window
	x11() # start a new one
(If not on Unix replace x11 with the appropriate command for your
system).

  David's solution is the more elegant one.

Terry T.



More information about the R-help mailing list