Hello,

two days ago Sebastian helped me to finish in a hurry a histogram with bar()

I would like now to understand how to make the plot with hist()

First of all, my data (after a massage) looks like :

## ···

-----------------------------------------

0.00e+00 1.00e-04 81039

1.00e-04 2.00e-04 4472

2.00e-04 3.00e-04 2033

3.00e-04 4.00e-04 1155

4.00e-04 5.00e-04 823

5.00e-04 6.00e-04 643

6.00e-04 7.00e-04 534

7.00e-04 8.00e-04 361

8.00e-04 9.00e-04 313

9.00e-04 1.00e-03 269

1.00e-03 1.10e-03 230

1.10e-03 1.20e-03 195

1.20e-03 1.30e-03 178

1.30e-03 1.40e-03 165

1.40e-03 1.50e-03 175

1.50e-03 1.60e-03 125

1.60e-03 1.70e-03 109

1.70e-03 1.80e-03 112

1.80e-03 1.90e-03 90

.

.

.

.

9.86e-02 9.87e-02 0

9.87e-02 9.88e-02 0

9.88e-02 9.89e-02 0

9.89e-02 9.90e-02 0

9.90e-02 9.91e-02 0

9.91e-02 9.92e-02 0

9.92e-02 9.93e-02 0

9.93e-02 9.94e-02 0

9.94e-02 9.95e-02 0

9.95e-02 9.96e-02 1

-----------------------------------------

The bins are given by the two first number columns.

For instance, the first bin is from 0.00e+00 to 1.00e-04 and has the

number of data 81039

Then I run the following script on them:

----------------------------------------------

#!/usr/bin/env python

from pylab import *

H = load ( './histo3.dat')

h = H[:, 2] # the third column

n, bins, patches = hist(h, 997, normed=0, log=0,

facecolor='lightblue', alpha=0.75)

show()

----------------------------------------------

The number 997 is because this is the number of lines I have in my

file (and, thus, the number of bins)

But the plot is ranging between

0 - 90000 --> on x axis

0 - 1000 --> on y axis

Notice in the data file that x does not get further than 9.96e-02

So the maximum should be 0.0996 and I am getting 90000

Why is that?

What am I doing wrong?

I have tried to substitute lower-case e with E in the data file but

this did not help

Any help would be appreciated.

thanks,

Pau