Skip to content

Commit 3efa400

Browse files
committed
documentation cleanups
1 parent ab633f8 commit 3efa400

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

R/geom-density2d.r

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,14 @@
3030
#' # set of contours for each value of that variable
3131
#' d + geom_density_2d(aes(colour = cut))
3232
#'
33-
#' # Similarly, if you apply faceting to the plot, contours will be
33+
#' # Similarly, if you apply faceting to the plot, contours will be
3434
#' # drawn for each facet, but the levels will calculated across all facets
3535
#' d + stat_density_2d(aes(fill = stat(level)), geom = "polygon") +
36-
#' facet_grid(.~cut) +
37-
#' scale_fill_viridis()
36+
#' facet_grid(. ~ cut) + scale_fill_viridis_c()
3837
#' # To override this behavior (for instace, to better visualize the density
3938
#' # within each facet), use stat(nlevel)
4039
#' d + stat_density_2d(aes(fill = stat(nlevel)), geom = "polygon") +
41-
#' facet_grid(.~cut) +
42-
#' scale_fill_viridis()
40+
#' facet_grid(. ~ cut) + scale_fill_viridis_c()
4341
#'
4442
#' # If we turn contouring off, we can use use geoms like tiles:
4543
#' d + stat_density_2d(geom = "raster", aes(fill = stat(density)), contour = FALSE)

R/stat-density.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#' plots}
2323
#' \item{scaled}{density estimate, scaled to maximum of 1}
2424
#' \item{ndensity}{alias for `scaled`, to mirror the syntax of
25-
#' `geom_bin()`}
25+
#' [`stat_bin()`]}
2626
#' }
2727
#' @export
2828
#' @rdname geom_density

man/geom_density.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/geom_density_2d.Rd

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)