Plot ranges of data in R
How to control the limits of data values in R plots.
R has multiple graphics engines. Here we will talk about the base graphics and the ggplot2
package.
We’ll create a bit of data to use in the examples:
one2ten <- 1:10
ggplot2
demands that you have a data frame:
ggdat <- data.frame(first=one2ten, second=one2ten)
Seriously exciting data, yes?
Default behavior
The default is — not surprisingly — to create limits so that the data comfortably fit. Read more →