1
私のアプリケーションでは、図の中でカーソルウィジェットを無効にして再度有効にしたいと考えています。残念ながら、カーソルが以前に無効にされている場合、Cursorを再表示させることはできないようです。 Cursorウィジェット(set_active、disconnect_events ...)のいくつかのメソッドを試しましたが、成功しませんでした。以下を考慮してください:Matplotlibウィジェット接続解除/再接続後にカーソルが再表示されない
from matplotlib.widgets import Cursor
import matplotlib.pyplot as plt
def onevent(event):
print "you clicked!"
plt.ion()
fig=plt.figure()
ax=fig.add_subplot(111)
c=Cursor(ax) # the cursor appears on my figure. Fine.
c.connect_event('button_press_event',onevent) # the cursor is connected. Fine
c.disconnect_events() # the cursor is disconnected, and has disappeared. Fine
c.connect_event('button_press_event',onevent) # the cursor is connected again (fine), but HAS NOT REAPPEARED (not fine!)
この現象を再現できますか? この動作は、qt、tk、またはwxバックエンドのいずれかで発生します。おかげさまで