-
Notifications
You must be signed in to change notification settings - Fork 182
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
Combined plot with uniform scale and scale breaks #797
Comments
Thanks. I can reproduce. Need to dig a bit deeper as to why library(ggstatsplot)
library(ggbreak)
set.seed(123)
ggbetweenstats(
data = iris,
x = Species,
y = Sepal.Length,
ggplot.component = list(scale_y_break(c(5, 7)))
)
#> Error in italic("F"): could not find function "italic" Created on 2023-07-20 with reprex v2.0.2 Trace: Error:
! could not find function "italic"
---
Backtrace:
▆
1. ├─base (local) `<fn>`(x)
2. └─ggbreak:::print.ggbreak(x)
3. ├─base::suppressWarnings(grid.draw.ggbreak(x, ...))
4. │ └─base::withCallingHandlers(...)
5. └─ggbreak:::grid.draw.ggbreak(x, ...)
6. └─ggbreak:::set_label(g, totallabs = totallabs, p2 = x)
7. ├─base::do.call(labs, totallabs)
8. └─ggplot2 (local) `<fn>`(...)
9. └─rlang::dots_list(...) |
@GuangchuangYu Do you see any obvious issues here before I dig into it deeper? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Indrajeet! Sorry to bother you.
I've been using extensively your package and now I have a quick question that is related to having a scale Y with breaks.
Assume I have the following code (from the gapminder package, with the life expectancy of one year artificially increased to simulate the need for a break in the Y axis):
To have a break in the Y axis I found the package
ggbreak
(https://cran.r-project.org/web/packages/ggbreak/vignettes/ggbreak.html) that should easily do the job via thescale_y_break
function. But it is incompatible with functions that arrange multiple plots (see FAQs at the bottom of the link).Plus, If I try to run the following:
I get the following error:
Error in italic("F") : italic supports only flextable objects.
I am aware I am asking something about the ggbreak package but I was wondering if you could help me out trying to have a plot which combines multiple plots, has uniform Y axis and has a break in the Y axis to help visualise the data in the plot in a proper way (maybe there is a simpler way that does not require
ggbreak
?)Thanks a lot
Luca
The text was updated successfully, but these errors were encountered: