12.3.10.4.1. PlottingΒΆ

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.figure()
timeStemps = pd.Series(np.random.randn(1000), index=pd.date_range("1/1/2000", periods=1000))
timeStemps = timeStemps.cumsum()
timeStemps.plot()
plt.show()
demo plotting
dataFrame = pd.DataFrame(np.random.randn(1000, 4), index=timeStemps.index, columns=["A", "B", "C", "D"])
dataFrame = dataFrame.cumsum()
plt.figure()
dataFrame.plot()
plt.legend(loc="best")
  • demo plotting
  • demo plotting
<matplotlib.legend.Legend object at 0x0000013C665252B0>

Total running time of the script: ( 0 minutes 0.336 seconds)