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

FeatureRequest: support for discrete axis break #68

Open
wbvguo opened this issue Apr 9, 2024 · 1 comment
Open

FeatureRequest: support for discrete axis break #68

wbvguo opened this issue Apr 9, 2024 · 1 comment

Comments

@wbvguo
Copy link

wbvguo commented Apr 9, 2024

Dear ggbreak developer,

Thanks for maintaining this package. While the current implementation mainly works with continues values, I was wondering if we could support for discrete axis break. For example, a horizontal barplot/boxplot where y are factors, and we want to add a break to y axis between factor 1 and factor 2

Thanks!

@wbvguo wbvguo changed the title FR: support for discrete axis break FeatureRequest: support for discrete axis break Jun 28, 2024
@AlexandreGareau
Copy link

AlexandreGareau commented Oct 21, 2024

I think discrete value should work if this code is adapted to not flag for reverse scoring.
Error in if (rngrev$flagrev == "reverse") { : argument is of length zero

In the meanwhile you can do it manually using facet_grid() as it accept logic statement as you would for aes() filtering.

df %>%
ggplot(aes(x, group)) +
facet_grid(
vars(group == "Name of the factor level you want the break"),
vars(facet1),
scales = "free_y",
space = "free"
)

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