-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
scale_size_area: default to area proportional to data value
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,9 +1,18 @@ | |||
#' Scale area instead of radius (for size). | #' Scale area instead of radius (for size). | ||
#' | #' | ||
#' \code{\link{scale_area}} is deprecated and will be removed in a future | |||
#' version of ggplot2. Use \code{\link{scale_size_area}} instead. Note that the | |||
#' default behavir of \code{\link{scale_size_area}} is slightly different: by | |||
#' default, it makes the area proportional to the numeric value. | |||
#' | |||
#' @param ... Other arguments passed on to \code{\link{continuous_scale}} | #' @param ... Other arguments passed on to \code{\link{continuous_scale}} | ||
#' to control name, limits, breaks, labels and so forth. | #' to control name, limits, breaks, labels and so forth. | ||
#' @param range Range of output sizes. Should be greater than 0. | #' @param range Range of output sizes. Should be greater than 0. | ||
#' @export | #' @export | ||
scale_area <- function(..., range = c(1, 6)) { | scale_area <- function(..., range = c(1, 6)) { | ||
message("scale_area is deprecated and will be removed in a future version of ggplot2.\n", | |||
" Use scale_size_area instead. Note that the behavior of scale_size_area is\n", | |||
" slightly different: by default it makes the area proportional to the\n", | |||
" numeric value.") | |||
continuous_scale("size", "area", area_pal(range), ...) | continuous_scale("size", "area", area_pal(range), ...) | ||
} | } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters