Well ... Looks like you're doing the drawing right. Below is the code below.
from pylab import * subplot(3,1,1) plot(arange(33)) subplot(3,1,2) plot(arange(44)) subplot(3,1,3) plot(arange(55),'r')

Your code has some problems, but the first thing I discovered is that your vectors t and x are not the same size.
source share