I’d like to specify separate colors for each of the bins I’ve defined in a Histogram.
Here’s the bin partitions, centers, and colors:
In[]:=
partitions={1.,5.47185,9.33259,12.58223,15.22076,17.24819};​​partitionCenters={3.23592,7.40222,10.95741,13.9015,16.23448};​​binHues={Hue[0.29166],RGBColor[0,1,1],Hue[0.58333],Hue[0.79166],Hue[1.]};
Now how to color the bars by bin# instead of height ... as specified by ColorFunction?
In[]:=
Histogram[​​Table[RandomReal[{First[partitions],Last[partitions]}],100],​​{partitions},​​PlotRange{{0,Automatic},{0,Automatic}},​​Ticks{Round[#,0.1]&/@partitionCenters,Automatic},​​AxesStyle{{Black,11},{Black,11}},​​AspectRatio160/352,​​ImageSize{352,160}​​]
Out[]=