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 arguments to geom_bracket for parsing plotmath expression #253

Closed
kassambara opened this issue Apr 5, 2020 · 1 comment
Closed

Add arguments to geom_bracket for parsing plotmath expression #253

kassambara opened this issue Apr 5, 2020 · 1 comment

Comments

@kassambara
Copy link
Owner

@kassambara kassambara commented Apr 5, 2020

No description provided.

@kassambara
Copy link
Owner Author

@kassambara kassambara commented Apr 5, 2020

library(ggpubr)
#> Le chargement a nécessité le package : ggplot2
# Data preparation
df <- ToothGrowth
df$dose <- factor(df$dose)

# Add bracket with text labels
ggboxplot(df, x = "dose", y = "len") +
  geom_bracket(
    xmin = "0.5", xmax = "1", y.position = 30,
    label = "t-test, p < 0.05"
  )

# Using expression
ggboxplot(df, x = "dose", y = "len") +
  geom_bracket(
    xmin = "0.5", xmax = "1", y.position = 30,
    label = "list(~italic(p) <= 0.05)",
    type = "expression"
  )

Created on 2020-04-05 by the reprex package (v0.3.0.9001)

kassambara added a commit that referenced this issue Apr 5, 2020
@kassambara kassambara closed this May 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.