I am creating a barplot in R and want to color each bar by bar height (count)
Currently what I have:
z=rnorm(n,1)
Z=runif(n)
h=barplot(Z)
I have pictures but not enough reputation to post them.
So here is the example in MatLab:
MatLab-Color bars by height
Try this,