-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
The upcoming release of scales (r-lib/scales#474) prompts a few tasks on ggplot2's side.
- Prepare for future incorporation of
breaks_exp()
intotransform_exp()
(Use snapshot expectations for transformation breaks #6171) - Remove shims like the following
Lines 792 to 808 in b29b831
# Shim for scales/#424 col_mix <- function(a, b, amount = 0.5) { input <- vec_recycle_common(a = a, b = b, amount = amount) a <- grDevices::col2rgb(input$a, TRUE) b <- grDevices::col2rgb(input$b, TRUE) new <- (a * (1 - input$amount) + b * input$amount) grDevices::rgb( new["red", ], new["green", ], new["blue", ], alpha = new["alpha", ], maxColorValue = 255 ) } on_load({ if ("col_mix" %in% getNamespaceExports("scales")) { col_mix <- scales::col_mix } }) - Tweak
col_mix()
calls to continue to produce the same hex codes, because the shim has agrDevices::rgb()
backend whilescales::col_mix()
is based on {farver}, producing tiny differences. - Rework default colour/fill scales to accept new palette specifications (More
palette
flexibility #6112, Flexible palettes #6216) - Ensure that default palettes can be retrieved from the theme (Scale palettes from theme #5946)
Yunuuuu