Skip to main content
2 of 2
edited tags
kglr
  • 400.5k
  • 18
  • 488
  • 929

BarChart and ColorFunction

There are really two questions. The first is: how does one get BarChart to generate x coordinates. That is, ListPlot takes a list of pairs, but BarChart takes a list of y-values only. Is there any way to impart x values to it?

Second question (which is related, because I am using BarChart so I can use ColorFunction) is: how do I invert ColorFunction. That is, "DarkRainbow" makes high values red, low values green. I want it exactly the other way around. What's the trick?

Igor Rivin
  • 5.1k
  • 20
  • 19