from matplotlib import pyplot as plt
%pylab inline#jupyter 要加这句
x = [1,2,3,4,5]
y = [num**2 for num in x]
plt.plot(x, y, color='green', marker='o', linestyle='solid')
plt.title('x**2')
plt.xlabel('x value')
plt.ylabel('y value')
plt.show()
# plt.savefig('plot')
name = ['Amy', 'Sam', 'Bob', 'Tom']
salary = [100, 200, 30, 491]
plt.xlabel('names')
plt.ylabel('salary')
plt.title('all money money go my home')
plt.bar(name, salary)
plt.savefig("money.png")