Skip to content

Add a note that geom_raster() ignores colour #4943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion R/geom-tile.r
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#' `y`, `width`, `height`). `geom_raster()` is a high
#' performance special case for when all the tiles are the same size.
#'
#' @eval rd_aesthetics("geom", "tile")
#' @eval rd_aesthetics("geom", "tile", "Note that `geom_raster()` ignores `colour`.")
#' @inheritParams layer
#' @inheritParams geom_point
#' @inheritParams geom_segment
Expand Down
5 changes: 4 additions & 1 deletion R/utilities-help.r
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
rd_aesthetics <- function(type, name) {
# Use extra_note arg to add some notes (e.g. the document is shared with multiple
# Geoms and there's some difference among their aesthetics).
rd_aesthetics <- function(type, name, extra_note = NULL) {
obj <- switch(type,
geom = check_subclass(name, "Geom", env = globalenv()),
stat = check_subclass(name, "Stat", env = globalenv())
Expand All @@ -14,6 +16,7 @@ rd_aesthetics <- function(type, name) {
"\\itemize{",
paste0(" \\item ", aes),
"}",
if (!is.null(extra_note)) paste0(extra_note, "\n"),
"Learn more about setting these aesthetics in \\code{vignette(\"ggplot2-specs\")}."
)
}
Expand Down
2 changes: 2 additions & 0 deletions man/geom_tile.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.