random_data_plotting_by_matplotlib



In [3]:
import matplotlib.pyplot as plt
import numpy as np
%matplotlib inline

In [15]:
import datetime as dt
dtl = np.arange('2016-01-01T00:00:00','2016-01-02T00:00:00',dtype='datetime64[h]')
for i in range(1,10):
    np.random.seed(i*1000)
    rnd = np.random.standard_normal(len(dtl)).cumsum()**2
    fig = plt.figure()
    plt.plot(dtl.astype(dt.datetime),rnd)
    plt.grid(True)
    sp = plt.subplot(111)
    sp.set_title("random seed: %d"%(i*1000),fontsize=18)
    fig.autofmt_xdate()



In [ ]: