In [4]: plt.plot([1,2,3,4],[1,2,3,4])
Out[4]: [<matplotlib.lines.Line2D at 0x184ef738588>]
In [5]: plt.show()
plt.xticks(rotation=45)
plt.xlable("这是x轴的标签")
plt.ylable("这是y轴的标签")
plt.title("这是图线的标题")
fig = plt.figure(figsize=(6,6))
ax1=fig.add_subplot(2,2,1)
ax1.plot([1,2,3,4],[1,2,3,4], c="yellow")
ax2=fig.add_subplot(2,2,2)
ax2.plot([1,2,3,4],[1,2,3,4], c="blue")
ax4=fig.add_subplot(2,2,4)
ax4.plot([1,2,3,4],[1,2,3,4], c="red", label="这是图线图例")
ax4.legend(loc="left")
plt.show()
from numpy import arange
bar_position = arange(5) + 0.75
bar_height = [1,2,3,4,5]
plt.bar(bar_position, bar_height, 0.3)
plt.show()
plt.scatter([1,2,3,4,5],[1,2,3,4,5])
plt.show()