Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a96a82

Browse files
committed
added get_status() function to the CheckButtons widget
1 parent f2cccf8 commit 7a96a82

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/matplotlib/widgets.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def reset(self):
474474

475475
class CheckButtons(AxesWidget):
476476
"""
477-
A GUI neutral radio button.
477+
A GUI neutral set of check buttons.
478478
479479
For the check buttons to remain responsive you must keep a
480480
reference to this object.
@@ -602,6 +602,12 @@ def set_active(self, index):
602602
return
603603
for cid, func in six.iteritems(self.observers):
604604
func(self.labels[index].get_text())
605+
606+
def get_status(self):
607+
"""
608+
returns a tuple of the status (True/False) of all of the check buttons
609+
"""
610+
return [l1.get_visible() for (l1,l2) in self.lines]
605611

606612
def on_clicked(self, func):
607613
"""

0 commit comments

Comments
 (0)