Hey blakeoft and all,
I am building a barplot (using ggplot) with values for 5 genes (SHP....PHB) side by side on the x axis comparing normalized fold induction on the y axis (for example, the most induced gene is SHP with normalized fold induction of ~30, then NGA1, etc). I have struggled a lot to add the error bars on top of the graph.
Could anyone please give me a hand with this? Many thanks.
genes<-factor(c('SHP', 'NGA1', 'PAN', 'TUB', 'PHB'))
values1<-c(29.77,4.55,3.23,1.28,0.06)
values2<-c(30.37,3.43,2.07,0.81,4.93)
df<- data.frame(genes,values1,values2)
ggplot(data=df,aes(x=genes,y=values1)) + geom_bar(stat='identity') +
scale_x_discrete(limits=df$genes[order(levels(df$genes))])
I am building a barplot (using ggplot) with values for 5 genes (SHP....PHB) side by side on the x axis comparing normalized fold induction on the y axis (for example, the most induced gene is SHP with normalized fold induction of ~30, then NGA1, etc). I have struggled a lot to add the error bars on top of the graph.
Could anyone please give me a hand with this? Many thanks.
genes<-factor(c('SHP', 'NGA1', 'PAN', 'TUB', 'PHB'))
values1<-c(29.77,4.55,3.23,1.28,0.06)
values2<-c(30.37,3.43,2.07,0.81,4.93)
df<- data.frame(genes,values1,values2)
ggplot(data=df,aes(x=genes,y=values1)) + geom_bar(stat='identity') +
scale_x_discrete(limits=df$genes[order(levels(df$genes))])
Comment