.. _pylab_examples-ginput_demo:

pylab_examples example code: ginput_demo.py
===========================================

[`source code <ginput_demo.py>`_]

::

    # -*- noplot -*-
    
    from pylab import arange, plot, sin, ginput, show
    t = arange(10)
    plot(t, sin(t))
    print "Please click"
    x = ginput(3)
    print "clicked",x
    show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)