>>221 >>222
回答ありがとうございます
参考にして書いて見た結果ボタンを押した位置に応じた場所に点がでるようになりました
度々ですみませんが今度は
1度ボタンを押した後、大きいキャンバスのどこかを2度目のクリックをしたときそこに
1度だけ点がでるようにしたいです
ここからどう変えれば良いでしょうか?(イメージとしてはボタンを押すと,次のクリックの入力待ちになるイメージです


from numpy.random import rand
import matplotlib.pyplot as plt
from matplotlib.widgets import Button

fig = plt.figure()
ax = fig.add_subplot(111)
plt.subplots_adjust(bottom=0.2)

class Index(object):
def __init__(self, ax):
self.ax = ax

def next(self, event):
xdata = event.xdata
ydata = event.ydata
self.ax.plot(xdata, ydata, color="red", marker="o")
plt.draw()

axnext = plt.axes([0.81, 0.05, 0.1, 0.075])
fig.canvas.mpl_connect('button_press_event', Index(ax).next)
bnext = Button(axnext, 'circle')
bnext.on_clicked(Index(ax).next)
plt.show()