Graph limits

Saw a good idea in a presentation the other day, perhaps with limited applications though.

ylim <- 1.1* range(mod$residuals)

To expand the axis a bit and ensure the residuals have a bit more space either side that usual.

NOTE: This works for residuals given that they will always be both positive and negative, otherwise you might need:

ylim <- c(0.9,1.1)*range(mod$residuals)

which may seem cumbersome but could add consistency if automating the production of multiple graphs.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s