.. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_event_handling_ginput_demo_sgskip.py: =========== Ginput Demo =========== This provides examples of uses of interactive functions, such as ginput, .. code-block:: python import matplotlib.pyplot as plt import numpy as np t = np.arange(10) plt.plot(t, np.sin(t)) print("Please click") x = plt.ginput(3) print("clicked", x) plt.show() .. _sphx_glr_download_gallery_event_handling_ginput_demo_sgskip.py: .. only :: html .. container:: sphx-glr-footer :class: sphx-glr-footer-example .. container:: sphx-glr-download :download:`Download Python source code: ginput_demo_sgskip.py ` .. container:: sphx-glr-download :download:`Download Jupyter notebook: ginput_demo_sgskip.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature Keywords: matplotlib code example, codex, python plot, pyplot `Gallery generated by Sphinx-Gallery `_