When you have some information example histogram then here is a small example you can refer to:
import random
import numpy as np
import matplotlib.pyplot as plt
x = []
for i in range(1,101):
x.append(random.randrange(1,101))
h, b = np.histogram(x, bins = 100, range = [0,100])
b = np.delete(b, 0)
plt.show(plt.plot(b,h))
import random
import numpy as np
import matplotlib.pyplot as plt
x = []
for i in range(1,101):
x.append(random.randrange(1,101))
h, b = np.histogram(x, bins = 100, range = [0,100])
b = np.delete(b, 0)
plt.show(plt.plot(b,h))
Very helpful article....I think we should make use of this wonderful approach quite often. After all, it makes complex data easy to understand and eye catchy too.
ReplyDelete@Sumant ....Can you please add some explanation on every line as to what is the meaning of some arguments ....e.g h, b = np.histogram(x, bins = 100, range = [0,100]), the usage of 'bin' is not so clear, although it works. Also please leave links for the documentation that one can follow.
ReplyDelete