How can I get the text from a matplotlib's TextBox? I have this:
(...)
ax_info = plt.axes([0.7, 0.7, 0.2, 0.25])
info_box = TextBox(ax_info, label='', initial='INFO:')
and then, when a button is pressed I have the following function:
def get_info(text):
info = text
np.savetxt(os.path.join(directory, 'info.txt'), info)
info_box.on_submit(get_info)
Why doesn't this work?