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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
plt.figure(figsize=(15, 7))
ax = plt.subplot(111)
# below annotate code show us the value or
#it is shown to show the data are not zero as it seem
#in graph other remaining near to zero are zero
ax.annotate('13', xy=(1980,13), xytext=(1980, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('8', xy=(1981,8), xytext=(1981, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('14', xy=(1982,14), xytext=(1982, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('10', xy=(1983,10), xytext=(1983, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('1', xy=(1986,1), xytext=(1986, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('2', xy=(1988,2), xytext=(1988, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('8', xy=(1996,8), xytext=(1996, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('6', xy=(1997,6), xytext=(1997, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('6', xy=(1998,6), xytext=(1998, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('4', xy=(1999,4), xytext=(1999, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('5', xy=(2001,5), xytext=(2001, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('14', xy=(2002,14), xytext=(2002, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('15', xy=(2003,15), xytext=(2003, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('17', xy=(2004,17), xytext=(2004, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('30', xy=(2005,30), xytext=(2005, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('78', xy=(2006,78), xytext=(2006, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('52', xy=(2007,52), xytext=(2007, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
ax.annotate('42', xy=(2008,42), xytext=(2008, 2000),
arrowprops=dict(facecolor='red', shrink=0.005))
plt.xlabel("Years")
plt.ylabel("No of immigrants")
ax.spines["top"].set_visible(False)
ax.spines["right"].set_visible(False)
plt.suptitle("Bhutan's Data")
plt.scatter(year,butan,s=butan,c="pink")
plt.plot(year,butan,c="black",marker='o')
plt.show()
|