You are reading documentation for the unreleased version of Matplotlib. Try searching for the released version of this page instead?
Version 2.1.1.post1076+g937889f
Fork me on GitHub

Related Topics

This Page

Ginput DemoΒΆ

This provides examples of uses of interactive functions, such as ginput,

from __future__ import print_function

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)

Gallery generated by Sphinx-Gallery