histogrammar / histogrammar-docs

Jekyll sources for https://histogrammar.github.io/histogrammar-docs/.
Apache License 2.0
2 stars 2 forks source link

NameError: name 'xrange' is not defined #22

Closed malhotrachetan closed 7 years ago

malhotrachetan commented 7 years ago

Hey everyone, I was going through the: 'Making plots with matplotlib' part of python docs and in the section: 'First Histogram' screen shot 2017-05-02 at 3 36 19 am

it throws an error: screen shot 2017-05-02 at 3 37 59 am

I guess in data = [random.random() for i in xrange(2000)], data should be declared as: data = [random.random() for i in hg.xrange(2000)]

Plus after executing the ditto code from docs, the plot looks something likes this:

screen shot 2017-05-02 at 3 40 42 am instead of: screen shot 2017-05-02 at 3 41 09 am