Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Re-roxygenize

  • Loading branch information...
commit 361937c7861aa25ca586c93c93b7c2f89a97b1bd 1 parent 72d15fc
Winston Chang wch authored
2  NAMESPACE
View
@@ -336,6 +336,7 @@ export(scale_shape_discrete)
export(scale_shape_identity)
export(scale_shape_manual)
export(scale_size)
+export(scale_size_area)
export(scale_size_continuous)
export(scale_size_discrete)
export(scale_size_identity)
@@ -386,6 +387,7 @@ export(theme_get)
export(theme_gray)
export(theme_grey)
export(theme_line)
+export(theme_minimal)
export(theme_rect)
export(theme_segment)
export(theme_set)
2  man/fortify.sp.Rd
View
@@ -3,10 +3,10 @@
\alias{fortify.Lines}
\alias{fortify.Polygon}
\alias{fortify.Polygons}
-\alias{fortify.sp}
\alias{fortify.SpatialLinesDataFrame}
\alias{fortify.SpatialPolygons}
\alias{fortify.SpatialPolygonsDataFrame}
+\alias{fortify.sp}
\title{Fortify method for classes from the sp package.}
\usage{
\method{fortify}{SpatialPolygonsDataFrame} (model, data,
21 man/geom_bar.Rd
View
@@ -36,6 +36,17 @@
the examples for a practical example.
}
\details{
+ The heights of the bars commonly represent one of two
+ things: either a count of cases in each group, the values
+ in a column of the data frame. By default,
+ \code{geom_bar} uses \code{stat="bin"}. This makes the
+ height of each bar equal to the number of cases in each
+ group, and it is incompatible with mapping values to the
+ \code{y} aesthetic. If you want the heights of the bars
+ to represent values in the data, use
+ \code{stat="identity"} and map a value to the \code{y}
+ aesthetic.
+
By default, multiple x's occuring in the same place will
be stacked a top one another by position_stack. If you
want them to be dodged from side-to-side, see
@@ -44,9 +55,6 @@
each x by stacking the bars and then stretching or
squashing to the same height.
- If you have presummarised data, use
- \code{stat="identity"} to turn off the default summary.
-
Sometimes, bar charts are used not as a distributional
summary, but instead of a dotplot. Generally, it's
preferable to use a dotplot (see \code{geom_point}) as it
@@ -70,6 +78,7 @@
# Generate data
c <- ggplot(mtcars, aes(factor(cyl)))
+# By default, uses stat="bin", which gives the count in each category
c + geom_bar()
c + geom_bar(width=.5)
c + geom_bar() + coord_flip()
@@ -79,6 +88,12 @@ c + geom_bar(fill="white", colour="darkgreen")
qplot(factor(cyl), data=mtcars, geom="bar")
qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(cyl))
+# When the data contains y values in a column, use stat="identity"
+library(plyr)
+# Calculate the mean mpg for each level of cyl
+mm <- ddply(mtcars, "cyl", summarise, mmpg = mean(mpg))
+ggplot(mm, aes(x = factor(cyl), y = mmpg)) + geom_bar(stat = "identity")
+
# Stacked bar charts
qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(vs))
qplot(factor(cyl), data=mtcars, geom="bar", fill=factor(gear))
2  man/gg-add.Rd
View
@@ -1,7 +1,7 @@
\name{+.gg}
+\alias{+.gg}
\alias{\%+\%}
\alias{\%+replace\%}
-\alias{+.gg}
\title{Modify a ggplot or theme object by adding on new components.}
\usage{
\method{+}{gg} (e1, e2)
7 man/scale_area.Rd
View
@@ -13,6 +13,11 @@
than 0.}
}
\description{
- Scale area instead of radius (for size).
+ \code{\link{scale_area}} is deprecated and will be
+ removed in a future version of ggplot2. Use
+ \code{\link{scale_size_area}} instead. Note that the
+ default behavir of \code{\link{scale_size_area}} is
+ slightly different: by default, it makes the area
+ proportional to the numeric value.
}
28 man/scale_size_area.Rd
View
@@ -0,0 +1,28 @@
+\name{scale_size_area}
+\alias{scale_size_area}
+\title{Scale area instead of radius, for size.}
+\usage{
+ scale_size_area(..., max_size = 6)
+}
+\arguments{
+ \item{...}{Other arguments passed on to
+ \code{\link{continuous_scale}} to control name, limits,
+ breaks, labels and so forth.}
+
+ \item{range}{Range of output sizes. Should be greater
+ than 0.}
+
+ \item{max_size}{Size of largest points.}
+}
+\description{
+ When \code{scale_size_area} is used, the default behavior
+ is to scale the area of points to be proportional to the
+ value.
+}
+\details{
+ Note that this controls the size scale, so it will also
+ control the thickness of lines. Line thickness will be
+ proportional to the square root of the value, which is
+ probably undesirable in most cases.
+}
+
2  man/stat_quantile.Rd
View
@@ -66,7 +66,7 @@ m + stat_quantile(method = "rqss")
m + stat_quantile(method = "rqss", lambda = 10)
m + stat_quantile(method = "rqss", lambda = 100)
-# Add aesthetic mappings
+# Use 'votes' as weights for the quantile calculation
m + stat_quantile(aes(weight=votes))
# Change scale
8 man/theme.Rd
View
@@ -92,9 +92,11 @@
numeric vector) \cr legend.box \tab arrangement of
multiple legends ("horizontal" or "vertical") \cr
- panel.background \tab background of plotting area
- (\code{element_rect}; inherits from \code{rect}) \cr
- panel.border \tab border around plotting area
+ panel.background \tab background of plotting area, drawn
+ underneath plot (\code{element_rect}; inherits from
+ \code{rect}) \cr panel.border \tab border around plotting
+ area, drawn on top of plot so that it covers tick marks
+ and grid lines. This should be used with \code{fill=NA}
(\code{element_rect}; inherits from \code{rect}) \cr
panel.margin \tab margin around facet panels
(\code{unit}) \cr panel.grid \tab grid lines
15 man/theme_minimal.Rd
View
@@ -0,0 +1,15 @@
+\name{theme_minimal}
+\alias{theme_minimal}
+\title{A minimalistic theme with no background annotations.}
+\usage{
+ theme_minimal(base_size = 12, base_family = "")
+}
+\arguments{
+ \item{base_size}{base font size}
+
+ \item{base_family}{base font family}
+}
+\description{
+ A minimalistic theme with no background annotations.
+}
+
Please sign in to comment.
Something went wrong with that request. Please try again.