Skip to content

Commit b4d8521

Browse files
Add a note that geom_raster() ignores colour (#4943)
1 parent 1c20c94 commit b4d8521

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

R/geom-tile.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#' `y`, `width`, `height`). `geom_raster()` is a high
88
#' performance special case for when all the tiles are the same size.
99
#'
10-
#' @eval rd_aesthetics("geom", "tile")
10+
#' @eval rd_aesthetics("geom", "tile", "Note that `geom_raster()` ignores `colour`.")
1111
#' @inheritParams layer
1212
#' @inheritParams geom_point
1313
#' @inheritParams geom_segment

R/utilities-help.r

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
rd_aesthetics <- function(type, name) {
1+
# Use extra_note arg to add some notes (e.g. the document is shared with multiple
2+
# Geoms and there's some difference among their aesthetics).
3+
rd_aesthetics <- function(type, name, extra_note = NULL) {
24
obj <- switch(type,
35
geom = check_subclass(name, "Geom", env = globalenv()),
46
stat = check_subclass(name, "Stat", env = globalenv())
@@ -14,6 +16,7 @@ rd_aesthetics <- function(type, name) {
1416
"\\itemize{",
1517
paste0(" \\item ", aes),
1618
"}",
19+
if (!is.null(extra_note)) paste0(extra_note, "\n"),
1720
"Learn more about setting these aesthetics in \\code{vignette(\"ggplot2-specs\")}."
1821
)
1922
}

man/geom_tile.Rd

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

0 commit comments

Comments
 (0)