Dear all,
Good day.
I am working to produce geom_bar in ggplot to in x axis I kept both species-culture system (cs) and in y axis % of omega-3 for recommended nutritional intake (RNI). I got four graphs sf1, mn1, fw1, bp1 accordingly but the y axis limit is differ to each other. I tried to add the following three # commands but none of them are working.
Would you please suggest me where I am making the mistakes?
fa<-read.csv("fame.5g.csv")
names(fa)
library ("ggplot2")
qplot(fa)
attach(fa)
cs2<-subset(fa,cs %in%c("FW","HSE","HSSI", "LSSI", "MSE", "MSSI", "Pocket"))
names(cs2)
sf1<-subset(cs2, Group=="Shellfish")
mn1<-subset(cs2, Group=="Mangrove")
fw1<-subset(cs2, Group=="Freshwater")
bp1<-subset(cs2, Group=="Byproduct")
print(ggplot(aes(x=reorder(Species:cs, RNI), y=RNI, fill=cs), data = cs2) +
geom_bar(stat="identity") + coord_flip())
print(ggplot(aes(x=reorder(Species:cs, RNI), y=RNI, fill=cs), data = fw1) +
geom_bar(stat="identity") + coord_flip())
#+expand_limits(y=c(0,60))
#+coord_cartesian(ylim = c(0,60))
#+ scale_y_continuous(limits = c(0,60))
Here I would like to expand y axis (RNI) up to 60

--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.