Permalink
Browse files

Re-roxygenize

  • Loading branch information...
1 parent 32b64a4 commit 790ef7eb1d45b52d8b338c89f1861c0c052f0f7b @wch wch committed Jun 24, 2012
Showing with 404 additions and 325 deletions.
  1. +185 −187 NAMESPACE
  2. +2 −2 man/add_theme.Rd
  3. +18 −1 man/calc_element.Rd
  4. +5 −3 man/element_line.Rd
  5. +4 −2 man/element_rect.Rd
  6. +5 −2 man/element_text.Rd
  7. +1 −1 man/gg-add.Rd
  8. +0 −30 man/ggplot-add.Rd
  9. +3 −0 man/rel.Rd
  10. +0 −36 man/theme-add.Rd
  11. +177 −55 man/theme.Rd
  12. +4 −6 man/theme_update.Rd
View
View
@@ -2,12 +2,12 @@
\alias{add_theme}
\title{Modify properties of an element in a theme object}
\usage{
- add_theme(t1, t2)
+ add_theme(t1, t2, t2name)
}
\description{
Modify properties of an element in a theme object
}
\seealso{
- +.theme
+ +.gg
}
View
@@ -2,16 +2,33 @@
\alias{calc_element}
\title{Calculate the element properties, by inheriting properties from its parents}
\usage{
- calc_element(element, theme)
+ calc_element(element, theme, verbose = FALSE)
}
\arguments{
\item{element}{The name of the theme element to
calculate}
\item{theme}{A theme object (like theme_grey())}
+
+ \item{verbose}{If TRUE, print out which elements this one
+ inherits from}
}
\description{
Calculate the element properties, by inheriting
properties from its parents
}
+\examples{
+t <- theme_grey()
+calc_element('text', t)
+
+# Compare the "raw" element definition to the element with calculated inheritance
+t$axis.text.x
+calc_element('axis.text.x', t, verbose = TRUE)
+
+# This reports that axis.text.x inherits from axis.text,
+# which inherits from text. You can view each of them with:
+t$axis.text.x
+t$axis.text
+t$text
+}
View
@@ -3,18 +3,20 @@
\title{Theme element: line.}
\usage{
element_line(colour = NULL, size = NULL, linetype = NULL,
- lineend = NULL)
+ lineend = NULL, color = NULL)
}
\arguments{
- \item{colour}{line color}
+ \item{colour}{line colour}
\item{size}{line size}
\item{linetype}{line type}
\item{lineend}{line end}
+
+ \item{color}{an alias for \code{colour}}
}
\description{
- This element draws a line between two (or more) points
+ Theme element: line.
}
View
@@ -3,16 +3,18 @@
\title{Theme element: rectangle.}
\usage{
element_rect(fill = NULL, colour = NULL, size = NULL,
- linetype = NULL)
+ linetype = NULL, color = NULL)
}
\arguments{
\item{fill}{fill colour}
- \item{colour}{border color}
+ \item{colour}{border colour}
\item{size}{border size}
\item{linetype}{border linetype}
+
+ \item{color}{an alias for \code{colour}}
}
\description{
Most often used for backgrounds and borders.
View
@@ -4,12 +4,13 @@
\usage{
element_text(family = NULL, face = NULL, colour = NULL,
size = NULL, hjust = NULL, vjust = NULL, angle = NULL,
- lineheight = NULL)
+ lineheight = NULL, color = NULL)
}
\arguments{
\item{family}{font family}
- \item{face}{font face ("plain", "italic", "bold")}
+ \item{face}{font face ("plain", "italic", "bold",
+ "bold.italic")}
\item{colour}{text colour}
@@ -22,6 +23,8 @@
\item{angle}{angle (in [0, 360])}
\item{lineheight}{line height}
+
+ \item{color}{an alias for \code{colour}}
}
\description{
Theme element: text.
View
@@ -71,6 +71,6 @@ add_el$text
rep_el$text
}
\seealso{
- \code{\link{ggplot}} and \code{\link{theme}}
+ \code{\link{theme}}
}
View
@@ -1,30 +0,0 @@
-\name{+.ggplot}
-\alias{\%+\%}
-\alias{+.ggplot}
-\title{Modify a plot by adding on new components.}
-\usage{
- \method{+}{ggplot} (e1, e2)
-
- %+%(e1, e2)
-}
-\arguments{
- \item{p}{plot object}
-
- \item{object}{component to add}
-}
-\description{
- What happens when you add on:
-}
-\details{
- \itemize{ \item \code{data.frame}: replace current
- data.frame (must use \code{\%+\%}) \item \code{uneval}:
- replace current aesthetics \item \code{layer}: add new
- layer \item \code{theme}: update plot theme \item
- \code{scale}: replace current scale \item \code{coord}:
- override current coordinate system \item \code{facet}:
- override current coordinate faceting }
-}
-\seealso{
- \code{\link{ggplot}}
-}
-
View
@@ -7,4 +7,7 @@
\description{
Relative sizing for theme elements
}
+\examples{
+qplot(1:3, 1:3) + theme(axis.title.x = element_text(size = rel(2.5)))
+}
View
@@ -1,36 +0,0 @@
-\name{+.theme}
-\alias{\%+replace\%}
-\alias{+.theme}
-\title{Modify elements in a theme object}
-\usage{
- +.theme(e1, e2)
-
- %+replace%(e1, e2)
-}
-\arguments{
- \item{e1}{theme object}
-
- \item{e2}{theme object to use for updating e1}
-}
-\description{
- The \code{+} operator and the \code{\%+replace\%} can be
- used to modify elements in themes.
-}
-\details{
- The \code{+} operator completely replaces elements with
- elements from e2.
-
- In contrast, the \code{\%+replace\%} operator does not
- replace the entire element; it only updates element
- properties which are present (not NULL) in the second
- object.
-}
-\examples{
-# Compare these results
-add_el <- theme_grey() + theme(text = element_text(family = "Times"))
-rep_el <- theme_grey() \%+replace\% theme(text = element_text(family = "Times"))
-
-add_el$text
-rep_el$text
-}
-
Oops, something went wrong. Retry.

0 comments on commit 790ef7e

Please sign in to comment.