Tag Archive for: R graphics

Plot ranges of data in R

21 Feb 2013
2013/02/21

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 →

© Copyright - Burns Statistics