You can use the width
parameter.
Since you didn't provide the Seurat object cart.combined
, I can't use your code, but here is a minimal reprex:
library(tidyverse)
vln_df <- tibble(Subset = rep(LETTERS[1:3], each = 100),
Expression = map(1:3,
~ rnbinom(100, mu = .x, size = 2)) |>
unlist())
vln_df |>
ggplot(mapping = aes(x = Subset, y = Expression)) +
geom_violin(mapping = aes(fill = Subset), scale = "width")
vln_df |>
ggplot(mapping = aes(x = Subset, y = Expression)) +
geom_violin(mapping = aes(fill = Subset), scale = "width", width = 0.5)
Created on 2023-06-07 with reprex v2.0.2