File: expand_limits.Rd

package info (click to toggle)
r-cran-ggplot2 1.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 4,412 kB
  • sloc: sh: 9; makefile: 1
file content (27 lines) | stat: -rw-r--r-- 765 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{expand_limits}
\alias{expand_limits}
\title{Expand the plot limits with data.}
\usage{
expand_limits(...)
}
\arguments{
\item{...}{named list of aesthetics specifying the value (or values) that
should be included in each scale.}
}
\description{
panels or all plots.  This function is a thin wrapper around
\code{\link{geom_blank}} that makes it easy to add such values.
}
\examples{
p <- qplot(mpg, wt, data = mtcars)
p + expand_limits(x = 0)
p + expand_limits(y = c(1, 9))
p + expand_limits(x = 0, y = 0)

qplot(mpg, wt, data = mtcars, colour = cyl) +
 expand_limits(colour = seq(2, 10, by = 2))
qplot(mpg, wt, data = mtcars, colour = factor(cyl)) +
 expand_limits(colour = factor(seq(2, 10, by = 2)))
}