.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "11_demos\python_packages\pandas\demo_plotting.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_11_demos_python_packages_pandas_demo_plotting.py: Plotting =========== .. GENERATED FROM PYTHON SOURCE LINES 5-10 .. code-block:: Python import pandas as pd import numpy as np import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 11-19 .. code-block:: Python 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() .. image-sg:: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_001.png :alt: demo plotting :srcset: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_001.png :class: sphx-glr-single-img .. GENERATED FROM PYTHON SOURCE LINES 20-27 .. code-block:: Python 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") .. rst-class:: sphx-glr-horizontal * .. image-sg:: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_002.png :alt: demo plotting :srcset: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_002.png :class: sphx-glr-multi-img * .. image-sg:: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_003.png :alt: demo plotting :srcset: /11_demos/python_packages/pandas/images/sphx_glr_demo_plotting_003.png :class: sphx-glr-multi-img .. rst-class:: sphx-glr-script-out .. code-block:: none .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.325 seconds) .. _sphx_glr_download_11_demos_python_packages_pandas_demo_plotting.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_plotting.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: demo_plotting.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: demo_plotting.zip `