python how to put data on y-axis when plotting histogram
- by user3041107
I don't quite understand how to control y - axis when using plt.hist plot in python. I read my .txt data file - it contains 10 columns with various data. If I want to plot distribution of strain on x axis I take column n.5. But what kind of value appears on y axis ??? Don't understand that.
here is the code:
import numpy
import matplotlib.pyplot as plt
from pylab import *
from scipy.stats import norm
import sys
strain = []
infile = sys.argv[1]
for line in infile:
ret = numpy.loadtxt(infile)
strain += list(ret[:,5])
fig = plt.figure()
plt.hist(strain, bins = 20)
plt.show()
Thanks for help!