Skip to content

Commit be262e9

Browse files
author
Pyiterator
authored
Create subplots
0 parents  commit be262e9

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

subplots

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import numpy as np
2+
import matplotlib.pyplot as plt
3+
4+
x= np.arange(0,9,0.1)
5+
6+
y_sin=np.sin(x)
7+
8+
y_cos=np.cos(x)
9+
10+
11+
plt.subplot(2,1,1)
12+
plt.title("TEAM A")
13+
plt.plot(x,y_sin,"m")
14+
plt.show()
15+
16+
17+
plt.subplot(2,1,3)
18+
plt.plot(x,y_cos,"r")
19+
plt.title("TEAM B")
20+
21+
plt.subplot(2,1,2)
22+
plt.plot(x,y_cos,"b")
23+
plt.title("TEAM c")
24+
plt.subplots_adjust(hspace=0.9) #hspace helps to enhance the visiility ex in ecg graphs
25+
plt.show()

0 commit comments

Comments
 (0)