This is a shortcut for supplying the limits
argument to the
individual scales. Note that, by default, any values outside the limits
will be replaced with NA
.
lims(...) xlim(...) ylim(...)
... | A name-value pair. The name must be an aesthetic, and the value must be either a length-2 numeric, a character, a factor, or a date/time. A numeric value will create a continuous scale. If the larger value
comes first, the scale will be reversed. You can leave one value as
A character or factor value will create a discrete scale. A date-time value will create a continuous date/time scale. |
---|
For changing x or y axis limits without dropping data
observations, see coord_cartesian()
. To expand the range of
a plot to always include certain values, see expand_limits()
.
#> Warning: Removed 19 rows containing missing values (geom_point).#> Warning: Removed 19 rows containing missing values (geom_point).#> Warning: Removed 14 rows containing missing values (geom_point).