by shigemk2

当面は技術的なことしか書かない

matplotlib tutorial 3

  • ylabel
  • xlabel
  • plot x y 色 ラベル名
import matplotlib.pyplot as plt
plt.plot([1,2,3,4,5],[3,3,3,3,3],'b-', label='alpha')
plt.plot([1,2,3,4,5],[1,2,3,4,5],'g-', label='omega')
plt.plot([1,2,3],[5,4,3],'r-', label='sigma')
plt.plot([3,4,5],[0,5,10],'c-', label='neo')
plt.legend( loc='upper left', numpoints = 1 )
plt.ylabel('y axis')
plt.xlabel('x axis')
plt.show()

matplotlib.pyplot.plot — Matplotlib 2.1.1 documentation

f:id:shigemk2:20180822170604p:plain