Message-ID: <5FA17042-BA26-444D-AC50-5C4544CAE9B6@comcast.net>
Date: 2013-11-13T01:44:43Z
From: David Winsemius
Subject: Change x-axis intervals and labels on cox.zph plot
In-Reply-To: <CAH18Qe2FmD2r0srvH1WzbKa9hvnmn1_CDw95BGF=k5VyZ78Lxw@mail.gmail.com>
On Nov 12, 2013, at 9:43 AM, Jared Duquette wrote:
> Hi all,
> The plot.cox.zph function automatically plots the x-axis, but I would like
> to change the intervals and labels of my cox.zph plots to 0, 50,100,150,
> 200. However, I cannot get the function to do so. I tried using the
> "axis(..." function, but that did not override the existing plot labels.
> Below is my code and attached example plots which I am trying to modify.
> Thank you in advance for your consideration and assistance.
> #plot.cox.zph code
> iw.zph=cox.zph(idealweather);
> par(mfrow=c(2,1),ann=F,mar=c(3.2,3.5,1.2,0.5),mgp=c(1.7, 0.6,
> 0),cex.axis=1.1,cex.lab=1.2,cex=0.9,pch=16,family="serif",col.axis=1);
> plot.cox.zph(iw.zph);
> title(ylab="scaled Schoenfeld",xlab="Time (days)");
survival:::plot.cox.zph is not a particularly large or complicated function. Why not make a copy and modify it? There are only 3 possible plot() calls to modify.
--
David Winsemius
Alameda, CA, USA