How can I plot only the top portion of a barplot so as to emphasize the difference between the bars without manually calculating the differences and plotting these. I care about the actual values and would thus prefer if these were on the y-axis. It seems like there should be an easy way to accomplish this. If not, I can plot differences and manually change the values which appear on the y-axis.
By changing the ylim I can display the portions of the barplot that have variation, like I want, but part of the bars go through my margins.
barplot(c(54.0, 56.7, 55.9, 59.0), ylim=c(50,60))
The original, less informative plot:
barplot(c(54.0, 56.7, 55.9, 59.0))
Thanks for any help!
Try xpd = FALSE in your call:
barplot(c(54.0, 56.7, 55.9, 59.0), ylim=c(50,60), xpd = FALSE)
box() #maybe nicer if you add this too
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With