ggpirate
ggpirate copied to clipboard
Make dodge_width an adjustable param
Thanks for this excellent function! just a minor feature request. Can you allow dodge width (for position_dodge) to be a settable param? I forked and tested on my end, so something like the following should work:
geom_pirate <- function(mapping = NULL, data = NULL,
...,
points = TRUE,
bars = TRUE,
lines = TRUE,
cis = TRUE,
violins = TRUE,
points_params = list(shape = 1, size = 1),
bars_params = list(alpha = 0.3, width = 0.9),
lines_params = list(size = 0.5, width = 0.9),
cis_params = list(fill = "white", size = 0.5,
alpha = 0.5, width = 0.8),
violins_params = list(fill = "white", size = 0.5,
alpha = 0, width = 0.7),
dodge_width = 0.9, #this (along with changing it in the subfunctions) should do it.
jitter_width = 0.2,
na.rm = FALSE,
show.legend = FALSE,
inherit.aes = TRUE)