You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature request: expose palette in discrete position scales #5770
The idea behind exposing a palette to discrete position scales is that the palette can be used to set custom spacings between discrete variables. Currently the 'palette' of discrete position scales is essentially seq_along(), and the ask here is to open this up to other functions that can translate discrete variables to continuous positions.
To give an example, let's say I have the following plot with a fake continuous scale separating groups of clarity:
I don't think it is worth the hassle renaming the palette argument for this particular request as palette is a pre-existing argument to the scale constructors. But yeah the pal_*() functions from {scales} are function factories whose results are valid input for the palette arguments in ggplot2.
Activity
davidhodge931 commentedon Apr 4, 2024
This looks useful :)
Wondering whether this argument should be called
palinstead ofpalette, so that it aligns with {scales} terminology?Or maybe the logic is a function that creates a palette uses
pal_*and an argument within a function is calledpalette?teunbrand commentedon Apr 4, 2024
I don't think it is worth the hassle renaming the
paletteargument for this particular request aspaletteis a pre-existing argument to the scale constructors. But yeah thepal_*()functions from {scales} are function factories whose results are valid input for thepalettearguments in ggplot2.