12.3.10.4.8. Plotting#

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
plt.figure()
timestamps = pd.Series(
    np.random.randn(1000), index=pd.date_range("1/1/2000", periods=1000)
)
timestamps = timestamps.cumsum()
timestamps.plot()
plt.show()
demo plotting
dataFrame = pd.DataFrame(
    np.random.randn(1000, 4), index=timestamps.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 0x000002CBD07A5E50>

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