Create a new tidyplot
Arguments
- data
A tidy
data.frame
to use for plotting.- ...
Mappings for the
x
axis,y
axis andcolor
, see examples. Additional argument are passed toggplot2::aes()
.- width
Width of the plot area. Defaults to
50
.- height
Height of the plot area. Defaults to
50
.- dodge_width
For adjusting the distance between grouped objects. Defaults to
0.8
.
Examples
study %>%
tidyplot(x = treatment, y = score, color = treatment) %>%
add_data_points_beeswarm()
study %>%
tidyplot(x = group, y = score, color = dose) %>%
add_mean_bar()
# Change plot area size
study %>%
tidyplot(x = treatment, y = score, color = treatment,
width = 35, height = 35) %>%
add_data_points_beeswarm()
# Change dodge_width
study %>%
tidyplot(x = group, y = score, color = dose, dodge_width = 0.3) %>%
add_mean_bar()