pbreheny / visreg

Visualization of regression functions
http://pbreheny.github.io/visreg/
62 stars 18 forks source link

Custom axes in visreg #23

Closed danawanzer closed 7 years ago

danawanzer commented 7 years ago

I was wondering if it is possible to do custom x- and y-axes in visreg. I saw code to do it in visreg2d but could not figure out how to do it in visreg. Essentially, the plots are currently extrapolating my y-axis beyond possible values (possible values range from 0 to 10 but it is plotting the y-axes from -5 to 15). If this is possible currently, I'd appreciate suggestions on how to code this. Thanks!

pbreheny commented 7 years ago

This works the same way in visreg as with any R plot:

fit <- lm(Ozone ~ Solar.R + Wind + Temp,data=airquality)
visreg(fit, "Wind", ylim=c(30, 80))

Maybe I'm not understanding you?

danawanzer commented 7 years ago

Thank you! I am still fairly new to R and haven't learned much in the way of plotting via R. I appreciate your help!

Best, Dana Linnell Wanzer, M.A. Evaluation, Research, and Statistics Consultant Evaluation Doctoral Student at Claremont Graduate University danawanzer.com | linkedin.com/in/danawanzer https://www.linkedin.com/in/danawanzer | (760) 835-3604

On Wed, Nov 2, 2016 at 12:57 PM, Patrick Breheny notifications@github.com wrote:

This works the same way in visreg as with any R plot:

fit <- lm(Ozone ~ Solar.R + Wind + Temp,data=airquality) visreg(fit, "Wind", ylim=c(30, 80))

Maybe I'm not understanding you?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pbreheny/visreg/issues/23#issuecomment-257980583, or mute the thread https://github.com/notifications/unsubscribe-auth/AWJViuy_-MR8dBzDbELaSzZzgZlYvHZoks5q6OsZgaJpZM4KnpOf .