-
Notifications
You must be signed in to change notification settings - Fork 38
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
fill_by for violin plots #175
Comments
See branch |
That's perfect!! Thanks a lot for the nice examples! |
Just as a suggestion (I can adapt it from your code), it would be great to add an option to modify the
|
I don't like the behaviour shown here except when the fill_by, x, and colour_by arguments all match. However dodging the jittered points means setting the dodge and jitter width to be similar to the violin plots, and choosing how to group points (probably the same as fill_by). That would I guess mean also exposing a |
Hi, developer I find it seems that
|
It would be nice if |
I attempted to implement it, but incorporating this functionality into the data <- scuttle::makePerCellDF(sce_object, features = markers)
data <- tidyr::pivot_longer(data,
cols = all_of(markers),
names_to = "Feature",
values_to = "logcounts"
)
violin_plot <- ggplot(data, aes(factor(label), logcounts)) +
geom_violin(aes(fill = celltypes), scale = "width", width = 0.8) +
scale_fill_brewer(type = "qual", palette = "Set3") +
guides(fill = guide_legend(
title = "Cell type", override.aes = list(size = 2L), ncol = 1L
)) +
labs(x = NULL) +
facet_wrap(vars(Feature),
ncol = n_col, scales = "free_x"
) +
cowplot::theme_cowplot(font_size = 10L) +
theme(axis.text.x = element_text(size = 6L)) |
See discussion in #174
How should this handle positions? eg these last examples seem variously sub-optimal
The text was updated successfully, but these errors were encountered: