Search for question
Question

Task 4 Three histograms via Matplotlib (1 point) Let mu (i.e., mean) and sigma (i.e., standard deviation) be 100 and 10, respectively. 1 Use np.random.randn() to generate three sets of 1000

random data points with respect to the mean and standard deviation. Save these three sets of data points as a variable x with a shape: (1000, 3). Use Matplotlib to draw a histogram of variable x with 20 bins, a background grid, and 0.75 alpha value. The edge of each vertical bar should be visible. The color of these three sets is control by ['red', 'green', 'blue'] Use plt.legend() to create a legend for this plot.

Fig: 1