Entering edit mode
9 months ago
ohtang7
▴
40
I made box plots with dots but the dots are too scattred around. Is there anyway to move them more into middle of box ?
My code is as this :
p<-ggplot(data, aes(x=Genus, y=Relative_abundance, fill=Group)) +
geom_boxplot(position = position_dodge(width = 0.8), alpha = 0.8) +
labs(title = "Relative Abundance Comparison",
x = "Genus",
y = "Relative Abundance",
fill = "Group") +
theme_minimal() +
scale_fill_manual(values = c(Stray = "blue", Pet = "red"))
p + geom_jitter(shape=16, height=0.0001)
Please help me !
Please understand that biostars is not a helpdesk for trivial ggplot questions. Google it and find help on previous StackExchange sites, or ask ChatGPT, it's great for these things. It's not bioinformatics what you ask.
You're right. I would get help from StackExchange sites and GPT
I would just draw them in by hand where you want them.