|
From: Christophe B. <pro...@gm...> - 2014-09-27 22:30:23
|
Hello.
In the following code, I would like to add two buttons. Is there an easy
way to do that ?
Christophe
================================
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
fig = plt.figure()
plt.axes(xlim = (0, 3), ylim = (0, 3))
def onclick(event):
print(event.xdata, event.ydata)
fig.canvas.mpl_connect('button_press_event', onclick)
plt.show()
|