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

Feature request: Could label_* functions support labelling every nth break? #436

Closed
davidhodge931 opened this issue Jun 4, 2024 · 2 comments

Comments

@davidhodge931
Copy link

davidhodge931 commented Jun 4, 2024

This is useful, as it provides another way to get the breaks & labels you want - and it can work well depending on the theme used.

I think it'd be ideal if this could be expressed as an argument every_nth argument in each label_* function.

This would then provide a way for the user to then determine the the frequency of labels (e.g. provide a label every 2nd break), and an offset (to start at not the first break if desired).

This is following on from this discussion here tidyverse/ggplot2#5881

@davidhodge931 davidhodge931 changed the title Could label_* functions support labelling every nth break? Could label_* functions support labelling every nth break? Jun 4, 2024
@davidhodge931 davidhodge931 changed the title Could label_* functions support labelling every nth break? Feature request: Could label_* functions support labelling every nth break? Jul 21, 2024
@davidhodge931
Copy link
Author

An example of a situation where this is useful..

A plot of monthly cases, where you want to demonstrate that it is monthly on the x axis using monthly minor breaks.

..But labelling every year does not fit for the size of image that you want to make. It works nice to label every 2nd break in this case

image

@thomasp85
Copy link
Member

I think the new compose_label() function is the way to go about this. Adding such functionality to every labelling function would be too big a change for what it provides.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants