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

add_xy_position continuous x axis #118

Open
jyuen531 opened this issue Jul 15, 2021 · 0 comments
Open

add_xy_position continuous x axis #118

jyuen531 opened this issue Jul 15, 2021 · 0 comments

Comments

@jyuen531
Copy link

jyuen531 commented Jul 15, 2021

Hi! I'm wondering if there's a solution to getting the positioning correct for a continuous x axis. Here's an example of the problem when I specify "numeric.x.axis = T"

lp <- ggline(
ToothGrowth, x = "dose", y = "len", add = "mean_sd",
color = "supp", palette = c("#00AFBB", "#E7B800"), numeric.x.axis = T
)
stat.test <- ToothGrowth %>%
group_by(dose) %>%
t_test(len ~ supp) %>%
adjust_pvalue(method = "bonferroni") %>%
add_significance("p.adj")
stat.test
stat.test <- stat.test %>%
add_xy_position(fun = "mean_sd", x = "dose")
lp + stat_pvalue_manual(
stat.test, label = "p.adj.signif",
linetype = "blank", vjust = 2
)

Thank you!

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

1 participant