I have tried to make a bar graph in ggplot2. However, the result only shows one value (because there is no another factor in the data) so I only got one bar and then I add a new row which the factor value is 0 to make comparison.
preframeprebar03
Var1 Freq
No 3895
newRow <- data.frame(Var1 ='Yes',Freq='0')
preframeprebar03 <- rbind(preframeprebar03,newRow)
names(preframeprebar03)<-c("Tree.presence","Freq")
plot4 <-ggplot(preframeprebar03,aes(Tree.presence, Freq))
plot4 <- plot4 +
geom_bar(stat="identity", width=0.2, colour="black", fill="steelblue", position="dodge")
And the result is
My question is how to make the 0 break to the down side and make the second bar to be close to the xlim?