How to change the text through code in matplotlib TextBox widget

后端 未结 2 1419
天命终不由人
天命终不由人 2021-01-23 02:57

I have a matplotlib widget Textbox as follows

temp_descr = \'wow\'
self.axLabel = plt.axes([0.7, 0.05, 0.21, 0.075])
self.text_boxLabel = TextBox(self.axLabel, \         


        
2条回答
  •  伪装坚强ぢ
    2021-01-23 03:34

    In case anyone is wondering how to do it the "wrong" way, here it is:

    textbox.text = "foo, bar and baz"
    

    This will update the display without updating the internal state, which could be useful to mock the "initial" functionality. Just beware that it will introduce some hard to find inconsistencies.

提交回复
热议问题