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 alpha option to ggviolin #77

Merged
merged 3 commits into from
Aug 12, 2018
Merged

Add alpha option to ggviolin #77

merged 3 commits into from
Aug 12, 2018

Conversation

florianduclot
Copy link
Contributor

Add option to add alpha transparency to ggviolin().

Tested with default example for ggviolin plot:

# Load data
data("ToothGrowth")
df <- ToothGrowth
head(df, 4)

my_comparisons <- list( c("0.5", "1"), c("1", "2"), c("0.5", "2") )


# Violin plots with box plots inside
# :::::::::::::::::::::::::::::::::::::::::::::::::::
# Change fill color by groups: dose
# add boxplot with white fill color
ggviolin(df, x = "dose", y = "len", fill = "dose", alpha = 0.5,
         palette = c("#00AFBB", "#E7B800", "#FC4E07"),
         add = "boxplot", add.params = list(fill = "white"))+
  stat_compare_means(comparisons = my_comparisons, label = "p.signif")+ # Add significance levels
  stat_compare_means(label.y = 50)           

@florianduclot
Copy link
Contributor Author

I finally added mention of the alpha option to the ggviolin manpage.
Sorry for taking so long for that, and thanks for having a look at this PR!

@kassambara
Copy link
Owner

Thank you for your contribution

@kassambara kassambara merged commit cbce3fe into kassambara:master Aug 12, 2018
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

Successfully merging this pull request may close these issues.

2 participants