import matplotlib.pyplot as plt import numpy as np x=np.arange(0,10,0.1) print "x=",x y=np.random.randn(len(x)) print "y=",y fig=plt.figure() # instance of the fig obj ax = fig.add_subplot(111) # instance of the axes obj l, m = ax.plot(x, y, x, y**2) # returns a tuple of obj l.set_color('blue') m.set_color('red') t = ax.set_title('random numbers') plt.show()