def plot_mts(Y, names=None, index=None):
 import matplotlib.pyplot as plt
 k = Y.shape[1]
 (rows, cols) = (k, 1)
 plt.figure(figsize=(10, 10))
 for j in range(k):
  ts = Y[:, j]
  ax = plt.subplot(rows, cols, (j + 1))
  if (index is not None):
   ax.plot(index, ts)
  else:
   ax.plot(ts)
  if (names is not None):
   ax.set_title(names[j])

def plot_mts ( Y , names = None , index = None ) : import matplotlib . pyplot as plt k = Y . shape [ 1 ] ( rows , cols ) = ( k , 1 ) plt . figure ( figsize = ( 10 , 10 ) ) for j in range ( k ) : ts = Y [ : , j ] ax = plt . subplot ( rows , cols , ( j + 1 ) ) if ( index is not None ) : ax . plot ( index , ts ) else : ax . plot ( ts ) if ( names is not None ) : ax . set_title ( names [ j ] )
plot multiple time series .