2

I have a 2D array. Lets say column 1 (a distribution), ranges from 0-2, column 2, ranges from 2-4, column 3, from 4-6 etc. I want to have a histogram plot for each of the columns, colored by the range, so for

column 1, blue-0 and red-2, 
column 2, blue-2 and red-4,

...and so on.

N West
  • 6,768
  • 25
  • 40
  • 2
    I'm not exactly sure I understand what you want, but you should check out [matplotlib](http://matplotlib.sourceforge.net/), in particular [matplotlib.pyplot.hist](http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.hist). – Chris Jan 24 '12 at 16:24
  • You could use the code in this [answer](http://stackoverflow.com/a/37559471/2087463) or this [answer](http://stackoverflow.com/a/37548733/2087463) as an example for plotting histograms. – tmthydvnprt Jun 01 '16 at 12:42

2 Answers2

2

Please have a look at matplotlib.pyplot.hist.

jcollado
  • 39,419
  • 8
  • 102
  • 133
2

I'm not sure but I think you could have a look at matplotlib.

Michael Dillon
  • 1,037
  • 6
  • 16