Python: Change the label of a matplotlib button on click -
how change label of matplotlib button on clicking it? if have matplotlib button label "before", want click , change label "after". how do this? feel should know can't find on online or in documentation.
assuming example http://matplotlib.org/1.3.1/examples/widgets/buttons.html
bprev.label="a new label!" #actually doesnt work...
i figured out next no knowledge of buttons looking @ docs (really glancing @ them) http://matplotlib.org/1.3.1/api/widgets_api.html#button
a little more experimentation led me
bprive.label.set_text("a new label") # works
Comments
Post a Comment