Skip to content
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

Explore options for extended discrete scales #33

Closed
teunbrand opened this issue Feb 18, 2021 · 1 comment
Closed

Explore options for extended discrete scales #33

teunbrand opened this issue Feb 18, 2021 · 1 comment
Labels
The 'Maybe' Pile This has a chance to be addressed in the future

Comments

@teunbrand
Copy link
Owner

Often enough you want your x-scales to depend on the y-scale. For example, you want to order the x-axis based on the values of the y-axis. You can get around this now by pre-ordering factor levels, but this might as well happen at the scale level. I want to explore the following:

  • Can I make a variant of ggplot2:::RangeDiscrete that aside from tracking unique levels on the x-axis that will track a semblance of the y-values too?
  • Can I make a variant of ScaleDiscretePosition that maps the x-values to the tracked levels
  • There has to be a way to include/exclude layers from participating in training the range. Probably this is best done at the aes stage. I.e. aes(x = include(xvar), ...) or something; I still have to figure out the name. A convenient side-effect is that you can then wrap the output of include() in a class that will automatically trigger the scale_x_tracked() or however I'm going to name it.
@teunbrand teunbrand added the The 'Maybe' Pile This has a chance to be addressed in the future label Feb 18, 2021
@teunbrand
Copy link
Owner Author

Nah this is probably too much trouble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
The 'Maybe' Pile This has a chance to be addressed in the future
Projects
None yet
Development

No branches or pull requests

1 participant