We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66d4fcc commit fb15ce7Copy full SHA for fb15ce7
money_supply.py
@@ -4,22 +4,27 @@
4
import numpy
5
import pandas
6
7
+x_label = 'Time(s)'
8
+y_label = 'M2'
9
+plot_title = 'Money Supply Unit:100 Million Yuan'
10
+ms_png_name = 'money_supply.png'
11
+
12
time_money = pandas.read_csv('money_supply.csv')
13
14
t = time_money.T.values[0]
15
m = time_money.T.values[1]
16
x = numpy.arange(1, len(t) + 1)
17
-pyplot.plot(x, m)
18
+pyplot.plot(x, m, 'ro-')
19
-pyplot.xlabel('Time(s)')
20
+pyplot.xlabel(x_label)
21
pyplot.xticks(x, t.tolist(), rotation=45)
22
-pyplot.ylabel('M2')
23
+pyplot.ylabel(y_label)
24
-pyplot.title('Money Supply Unit:100 Million Yuan')
25
+pyplot.title(plot_title)
26
27
pyplot.grid(True)
28
-pyplot.savefig("Money_Supply.png")
29
+pyplot.savefig(ms_png_name)
30
pyplot.show()
0 commit comments