Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-06 Thread S Ellison
r-help-boun...@r-project.org] On Behalf Of Paul > Murrell > Sent: 05 August 2018 22:24 > To: Christofer Bogaso; r-help > Subject: Re: [R] [FORGED] Adding % sign to ticks in persp() > > Hi > > Not in the persp() function itself, but the following code converts the >

Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-05 Thread Christofer Bogaso
Awesome, thanks! On Mon, Aug 6, 2018 at 2:54 AM Paul Murrell wrote: > Hi > > Not in the persp() function itself, but the following code converts the > persp() output to 'grid' output then modifies the labels to add > percentage signs ... > > x <- seq(-10, 10, length= 30) > y <- x > f <-

Re: [R] [FORGED] Adding % sign to ticks in persp()

2018-08-05 Thread Paul Murrell
Hi Not in the persp() function itself, but the following code converts the persp() output to 'grid' output then modifies the labels to add percentage signs ... x <- seq(-10, 10, length= 30) y <- x f <- function(x, y) { r <- sqrt(x^2+y^2); 10 * sin(r)/r } z <- outer(x, y, f) z[is.na(z)] <- 1