Skip to content

Palettes for discrete scales #5771

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
merged 10 commits into from
May 20, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
resolve merge conflict
Merge branch 'main' into discrete_palette

# Conflicts:
#	R/scale-discrete-.R
  • Loading branch information
teunbrand committed May 20, 2024
commit b2fd69d7836e68c3ad351dd1fb8dfd3597369acf
9 changes: 5 additions & 4 deletions R/scale-discrete-.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#' @inheritParams discrete_scale
#' @param palette A function that takes the limits as input and provides
#' numerical values as output.
#' @param sec.axis [dup_axis()] is used to specify a secondary axis.
#' @rdname scale_discrete
#' @family position scales
#' @seealso
Expand Down Expand Up @@ -66,8 +67,8 @@
#' scale_x_discrete(labels = abbreviate)
#' }
scale_x_discrete <- function(name = waiver(), ..., palette = seq_len,
expand = waiver(),
guide = waiver(), position = "bottom") {
expand = waiver(), guide = waiver(),
position = "bottom", sec.axis = waiver()) {
sc <- discrete_scale(
aesthetics = c("x", "xmin", "xmax", "xend"), name = name,
palette = palette, ...,
Expand All @@ -81,8 +82,8 @@ scale_x_discrete <- function(name = waiver(), ..., palette = seq_len,
#' @rdname scale_discrete
#' @export
scale_y_discrete <- function(name = waiver(), ..., palette = seq_len,
expand = waiver(),
guide = waiver(), position = "left") {
expand = waiver(), guide = waiver(),
position = "left", sec.axis = waiver()) {
sc <- discrete_scale(
aesthetics = c("y", "ymin", "ymax", "yend"), name = name,
palette = palette, ...,
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.