

.. _sphx_glr_gallery_pylab_examples_coords_report.py:


=============
Coords Report
=============

Override the default reporting of coords.




.. image:: /gallery/pylab_examples/images/sphx_glr_coords_report_001.png
    :align: center





.. code-block:: python


    import matplotlib.pyplot as plt
    import numpy as np


    def millions(x):
        return '$%1.1fM' % (x*1e-6)

    # Fixing random state for reproducibility
    np.random.seed(19680801)

    x = np.random.rand(20)
    y = 1e7*np.random.rand(20)

    fig, ax = plt.subplots()
    ax.fmt_ydata = millions
    plt.plot(x, y, 'o')

    plt.show()

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



.. container:: sphx-glr-footer


  .. container:: sphx-glr-download

     :download:`Download Python source code: coords_report.py <coords_report.py>`



  .. container:: sphx-glr-download

     :download:`Download Jupyter notebook: coords_report.ipynb <coords_report.ipynb>`

.. rst-class:: sphx-glr-signature

    `Generated by Sphinx-Gallery <https://sphinx-gallery.readthedocs.io>`_
