Question: matplotlib is a powerful graphing package for Python that can draw many kinds of graphs. It is useful when you need to graph and analyze
matplotlib
is a powerful graphing package for Python that can draw many kinds of
graphs. It is useful when you need to graph and analyze data. You can read about
the module at
http://matplotlib.sourceforge.net/
. Read the documentation
to learn how to use this module to plot a histogram of the data generated as a list
by the code below. Add graphical representations of the mean and the standard
deviation to the histogram. by python
from random import gammavariate
def randomList_gamma(n, a, b):
randomList = []
for i in range(n):
rand = float("{0:.1f}".format(gammavariate(a, b)))
randomList.append(rand)
return randomList
rand_list = randomList_gamma (1000 , 2, 2)
print(rand_list)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
