How to script grouped barplot with errorbar using ggplot?

问题描述 投票:0回答:0

Please help me to write script for grouped barplot with SEM. In table, Ex6 with SD6 as errobar, Ex7 with SD7 as errobar and Ex9 with SD9 as errobar. Thank you

我试过了但没用 E679 <- as.data.frame(readxl::read_excel("Group 6-7-9.xlsx", sheet = 1)) E679$r = c('C1','C2','C3','C4','C5','C6','C7','C8','C9','C10','C11','C12','C13','C14','C15','C16','C17','HDR2','HDR1','WT1','WT2') E679=reshape::melt(E679)

ggplot(E679,aes(fct_inorder(r, ordered=NA),value, fill=variable))+ geom_bar(stat = 'identity',position='dodge')+ geom_errorbar(aes(ymin=Ex6-SD6, ymax=Ex6+SD6),position = position_dodge(0.95), width = 0.25)

r ggplot2 bar-chart errorbar
© www.soinside.com 2019 - 2024. All rights reserved.