s-news
[Top] [All Lists]

FW: Legend/Key in Kaplan-Meier plots

To: "'s-news@lists.biostat.wustl.edu'" <s-news@lists.biostat.wustl.edu>
Subject: FW: Legend/Key in Kaplan-Meier plots
From: "Paul, David A" <paulda@BATTELLE.ORG>
Date: Tue, 18 Jun 2002 13:50:09 -0400
Bill Dunlap of Insightful provided a solution that has
worked very well.  His comments are below.  -david paul


____________________________________________________________________________
_
From: Bill Dunlap [mailto:bill@insightful.com]
Sent: Tuesday, June 18, 2002 1:11 PM
To: Paul, David A
Subject: Re: [S] Legend/Key in Kaplan-Meier plots

I think you will have to edit the function plot.kaplanMeier to do this.
At the end you will see the lines

        if(nfits > 1) {
                key(text = names(fits), line = list(lty = lty, lwd = lwd,
col
                         = col))
        }

If you add to the argument list the argument key.ok=T and change
        if(nfits > 1) {
to
        if(key.ok && nfits > 1) {
then you avoid the key by adding key.ok=F to your calls to plot().
You should not see any difference if you don't add key.ok=T to the
calls to plot.

----------------------------------------------------------------------------
Bill Dunlap                                      22461 Mt Vernon-Big Lake Rd
Insightful Corporation                           Mount Vernon, WA 98274
bill@insightful.com                              360-428-8146

____________________________________________________________________________
___


<Prev in Thread] Current Thread [Next in Thread>