Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

How do I vertically center numbers on an histogram plot in R?

$
0
0

How do I center numbers on columns?

bar <- barplot(VADeaths)

text(rep(bar,each=nrow(VADeaths)),as.vector(apply(VADeaths,2,cumsum)), 
 labels=as.vector(apply(VADeaths,2,cumsum)),
 pos=1,cex=1,adj = c(0,0),col="orange",offset = 0.2)

This is how it looks now:

1

And I need to make it like here:

2

How do I do this? Thank you!


Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>