New answers tagged

2

Seurat does violin plots using ggplot, which orders based on the factor levels. You need to re-factor your grouping category so that the levels matches your preferred order: # default level sort order is alphabetical obj[["grouping"]] <- factor(unlist(obj[["grouping"]])) VlnPlot(obj, group.by = "grouping", features = c("...


0

It is difficult to say exactly what you would like to achieve without an example. But if you would like an individual axis based on a factor like patient maybe you want to use facet_wrap for the Patient variable like in the example below? library(ggplot2) data <- iris ggplot(data, aes(x=Sepal.Width, y=Sepal.Length, fill=Species)) + geom_violin() + ...


Top 50 recent answers are included