Skip to content

Commit 14de9bd

Browse files
committed
violin plots do not support alpha arg
1 parent 4cbd535 commit 14de9bd

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

docs/examples/geoms/geom_violin.jl

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
# A violin plot is a compact display of a continuous distribution. It is a mirrored density plot displayed in the same way as a boxplot. Violin plots are useful for comparing distributions across groups, as they show more detail about the shape of the distribution than boxplots while still being compact.
44

5+
# ## Note on apppropriate use
6+
7+
# The violin plot is somewhat controversial and there is usually a better way to display your data. For a discussion of this topic, see [this video](https://www.youtube.com/watch?v=_0QMKFzW9fw) by Angela Collier.
8+
59
# ## Arguments
610

711
# - `plot::GGPlot` (optional): a plot object to add this geom to. This is typically used to facilitate creating your ggplot as part of a @chain.
@@ -84,26 +88,6 @@ ggplot(penguins, @aes(x = species, y = bill_length_mm)) +
8488
ggplot(penguins, @aes(x = species, y = bill_length_mm, fill = species)) +
8589
geom_violin(strokecolor = :black, strokewidth = 1)
8690

87-
# ## Combining with Other Geoms
88-
89-
# Combine violin with boxplot for more information:
90-
91-
ggplot(penguins, @aes(x = species, y = bill_length_mm)) +
92-
geom_violin() +
93-
geom_boxplot(width = 0.2, alpha = 0.8)
94-
95-
# Add individual data points:
96-
97-
ggplot(penguins, @aes(x = species, y = bill_length_mm)) +
98-
geom_violin(alpha = 0.5) +
99-
geom_point(alpha = 0.3)
100-
101-
# Use jittered points for better visibility:
102-
103-
ggplot(penguins, @aes(x = species, y = bill_length_mm)) +
104-
geom_violin(strokecolor = :black) +
105-
geom_jitter(alpha = 0.3, width = 0.1)
106-
10791
# ## Comparing Multiple Variables
10892

10993
# Compare distributions across different measurements:

0 commit comments

Comments
 (0)