Browse Source

figures!

tags/v0.1.1
hrbrmstr 8 years ago
parent
commit
3a31652ade
  1. 4
      DESCRIPTION
  2. 6
      R/coord_proj.r
  3. 6
      R/geom_ash.r
  4. 6
      R/geom_bkde.r
  5. 10
      R/geom_bkde2d.r
  6. 6
      R/geom_xspline.r
  7. 7
      man/coord_proj.Rd
  8. BIN
      man/figures/coord_proj_01.png
  9. BIN
      man/figures/geom_bkde2d_01.png
  10. BIN
      man/figures/geom_bkde_01.png
  11. BIN
      man/figures/geom_xspline_01.png
  12. BIN
      man/figures/stat_ash_01.png
  13. 7
      man/geom_bkde.Rd
  14. 11
      man/geom_bkde2d.Rd
  15. 7
      man/geom_xspline.Rd
  16. 7
      man/stat_ash.Rd

4
DESCRIPTION

@ -10,12 +10,14 @@ Depends:
ggplot2 (>= 2.0.0)
License: AGPL + file LICENSE
LazyData: true
URL: http://github.com/hrbrmstr/ggalt
BugReports: https://github.com/hrbrmstr/ggalt/issues
Suggests:
testthat,
gridExtra,
knitr,
rmarkdown,
ggthemes
ggthemes,
Encoding: UTF-8
Imports:
graphics,

6
R/coord_proj.r

@ -6,6 +6,12 @@
#' \code{coord_proj} does, using the \code{proj4::project()} function from
#' the \code{proj4} package.
#'
#' \if{html}{
#' A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection:
#'
#' \figure{coord_proj_01.png}{options: width="100\%" alt="Figure: coord_proj_01.png"}
#' }
#'
#' @param proj projection definition. If left \code{NULL} will default to
#' a Robinson projection
#' @param inverse if \code{TRUE} inverse projection is performed (from a

6
R/geom_ash.r

@ -2,6 +2,12 @@
#'
#' See \code{\link[ash]{bin1}} & \code{\link[ash]{ash1}} for more information.
#'
#' \if{html}{
#' A sample of the output from \code{stat_ash()}:
#'
#' \figure{stat_ash_01.png}{options: width="100\%" alt="Figure: stat_ash_01.png"}
#' }
#'
#' @inheritParams ggplot2::geom_area
#' @param geom Use to override the default Geom
#' @param ab half-open interval for bins \emph{[a,b)}. If no value is specified,

6
R/geom_bkde.r

@ -3,6 +3,12 @@
#' A kernel density estimate, useful for display the distribution of variables
#' with underlying smoothness.
#'
#' \if{html}{
#' A sample of the output from \code{geom_bkde()}:
#'
#' \figure{geom_bkde_01.png}{options: width="100\%" alt="Figure: geom_bkde_01.png"}
#' }
#'
#' @section Aesthetics:
#' \code{geom_bkde} understands the following aesthetics (required aesthetics
#' are in bold):

10
R/geom_bkde2d.r

@ -9,9 +9,9 @@
#' xlim(0.5, 6) +
#' ylim(40, 110)
#'
#' m + geom_bkde2d(bandwidth=c(0.5, 5))
#' m + geom_bkde2d(bandwidth=c(0.5, 4))
#'
#' m + stat_bkde2d(bandwidth=c(0.5, 5), aes(fill = ..level..), geom = "polygon")
#' m + stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon")
#'
#' # If you map an aesthetic to a categorical variable, you will get a
#' # set of contours for each value of that variable
@ -71,6 +71,12 @@ GeomBkde2d <- ggproto("GeomBkde2d", GeomPath,
#' Perform a 2D kernel density estimation using \code{bkde2D} and display the
#' results with contours. This can be useful for dealing with overplotting
#'
#' \if{html}{
#' A sample of the output from \code{geom_bkde2d()}:
#'
#' \figure{geom_bkde2d_01.png}{options: width="100\%" alt="Figure: geom_bkde2d_01.png"}
#' }
#'
#' @param bandwidth the kernel bandwidth smoothing parameter. see
#' \code{\link[KernSmooth]{bkde2D}} for details. If \code{NULL},
#' it will be computed for you but will most likely not yield optimal

6
R/geom_xspline.r

@ -4,6 +4,12 @@
#' Patterned after \code{geom_line} in that it orders the points by \code{x}
#' first before computing the splines.
#'
#' \if{html}{
#' A sample of the output from \code{geom_xspline()}:
#'
#' \figure{geom_xspline_01.png}{options: width="100\%" alt="Figure: geom_xspline_01.png"}
#' }
#'
#' @section Aesthetics:
#' \code{geom_xspline} understands the following aesthetics (required aesthetics
#' are in bold):

7
man/coord_proj.Rd

@ -36,6 +36,13 @@ spherical, onto a flat 2D plane requires a projection. This is what
\code{coord_proj} does, using the \code{proj4::project()} function from
the \code{proj4} package.
}
\details{
\if{html}{
A sample of the output from \code{coord_proj()} using the Winkel-Tripel projection:
\figure{coord_proj_01.png}{options: width="100\%" alt="Figure: coord_proj_01.png"}
}
}
\note{
When \code{inverse} is \code{FALSE} \code{coord_proj} makes a fairly
large assumption that the coordinates being transformed are within

BIN
man/figures/coord_proj_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
man/figures/geom_bkde2d_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
man/figures/geom_bkde_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
man/figures/geom_xspline_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

BIN
man/figures/stat_ash_01.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

7
man/geom_bkde.Rd

@ -78,6 +78,13 @@ for details}
A kernel density estimate, useful for display the distribution of variables
with underlying smoothness.
}
\details{
\if{html}{
A sample of the output from \code{geom_bkde()}:
\figure{geom_bkde_01.png}{options: width="100\%" alt="Figure: geom_bkde_01.png"}
}
}
\section{Aesthetics}{
\code{geom_bkde} understands the following aesthetics (required aesthetics

11
man/geom_bkde2d.Rd

@ -88,6 +88,13 @@ Contours from a 2d density estimate.
Perform a 2D kernel density estimation using \code{bkde2D} and display the
results with contours. This can be useful for dealing with overplotting
}
\details{
\if{html}{
A sample of the output from \code{geom_bkde2d()}:
\figure{geom_bkde2d_01.png}{options: width="100\%" alt="Figure: geom_bkde2d_01.png"}
}
}
\section{Computed variables}{
Same as \code{\link{stat_contour}}
@ -98,9 +105,9 @@ m <- ggplot(faithful, aes(x = eruptions, y = waiting)) +
xlim(0.5, 6) +
ylim(40, 110)
m + geom_bkde2d(bandwidth=c(0.5, 5))
m + geom_bkde2d(bandwidth=c(0.5, 4))
m + stat_bkde2d(bandwidth=c(0.5, 5), aes(fill = ..level..), geom = "polygon")
m + stat_bkde2d(bandwidth=c(0.5, 4), aes(fill = ..level..), geom = "polygon")
# If you map an aesthetic to a categorical variable, you will get a
# set of contours for each value of that variable

7
man/geom_xspline.Rd

@ -70,6 +70,13 @@ Patterned after \code{geom_line} in that it orders the points by \code{x}
first before computing the splines.
}
\details{
\if{html}{
A sample of the output from \code{geom_xspline()}:
\figure{geom_xspline_01.png}{options: width="100\%" alt="Figure: geom_xspline_01.png"}
}
An X-spline is a line drawn relative to control points. For each control
point, the line may pass through (interpolate) the control point or it may
only approach (approximate) the control point; the behaviour is determined

7
man/stat_ash.Rd

@ -61,6 +61,13 @@ the default plot specification, e.g. \code{\link{borders}}.}
\description{
See \code{\link[ash]{bin1}} & \code{\link[ash]{ash1}} for more information.
}
\details{
\if{html}{
A sample of the output from \code{stat_ash()}:
\figure{stat_ash_01.png}{options: width="100\%" alt="Figure: stat_ash_01.png"}
}
}
\section{Aesthetics}{
\code{geom_ash} understands the following aesthetics (required aesthetics

Loading…
Cancel
Save