From therneau at mayo.edu  Thu Jun 11 22:25:25 2015
From: therneau at mayo.edu (Therneau, Terry M., Ph.D.)
Date: Thu, 11 Jun 2015 15:25:25 -0500
Subject: [Rd] Odd behavior of plot function
In-Reply-To: <OF5EB8132B.6312409B-ON85257E61.0062DDC7-85257E61.0062DDCB@american.edu>
References: <2f3a88$qmoqc@ironport10.mayo.edu>
	<OF5EB8132B.6312409B-ON85257E61.0062DDC7-85257E61.0062DDCB@american.edu>
Message-ID: <2f3a88$qpc88@ironport10.mayo.edu>

     Sorry, that's a cut and paste error.  It should be either tempx or xtemp throughout.
Terry T

On 06/11/2015 12:59 PM, John Nolan wrote:
> Is there a misprint in your example?  The first line of code uses tempx, but the rest uses a different variable xtemp?
>
> John
>
> -----"R-devel" <r-devel-bounces at r-project.org> wrote: -----
> To: "r-devel at r-project.org" <r-devel at r-project.org>
> From: "Therneau, Terry M., Ph.D."
> Sent by: "R-devel"
> Date: 06/11/2015 12:50PM
> Subject: [Rd] Odd behavior of plot function
>
> The following code snippet taken from plot.survfit now gives me a surprising result:
>
> tempx <- c(0, 400, 0, 0)
> ytemp <- c(.0657, .98, 1, 0)
> plot(range(xtemp), range(ytemp), log='y', type='n')
>
> In that the max value for the x axis is now 10.  The 0 on the end of ytemp was actually a
> mistake and shouldn't be there, if you remove it then the upper limit is sensible.
>
> plot(range(xtemp), range(ytemp[1:3]), log='y', type='n')
>
> I've now fixed this in the survival package.  I can't say when the odd behavior crept in,
> but am sure it was not always there.  I draw log scale plots only a few times a year.
>
> Terry T.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] Odd behavior of plot function
Therneau, Terry M., Ph.D.