.. 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 Click :ref:`here ` 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-9 .. code-block:: default import pandas as pd import numpy as np import matplotlib.pyplot as plt .. GENERATED FROM PYTHON SOURCE LINES 10-16 .. code-block:: default 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() .. 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 17-22 .. code-block:: default 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") .. 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.336 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-python :download:`Download Python source code: demo_plotting.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: demo_plotting.ipynb `