-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtask2.py
More file actions
32 lines (27 loc) · 815 Bytes
/
task2.py
File metadata and controls
32 lines (27 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""
DHRUV PATEL
AM.EN.U4CSE16507
"""
import numpy as np
import matplotlib.pyplot as plt
#Task No.2 - Histogram 1
t1 = np.random.normal(5,2,1000) #mean=5,std=2,event=1000
plt.title("Histogram of Task 2 Graph 1")
plt.xlabel('Events')
plt.ylabel('Probability density')
plt.hist(t1,5,density=True,edgecolor="black")
plt.show()
#Task No.2 - Histogram 2
t2 = np.random.normal(10,3,1000) #mean=10,std=3,event=1000
plt.title("Histogram of Task 2 Graph 2")
plt.xlabel('Events')
plt.ylabel('Probability density')
plt.hist(t2,10,density=True,edgecolor="red")
plt.show()
#Task No.2 - Histogram 3
t3 = np.random.normal(15,4,1000) #mean=15,std=4,event=1000
plt.title("Histogram of Task 2 Graph 3")
plt.xlabel('Events')
plt.ylabel('Probability density')
plt.hist(t3,15,density=True,edgecolor="green")
plt.show()