You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplify CheckButtons and RadioButtons click handler.
Shorten the code that determines which button has been clicked.
Use Text.contains directly (it calls text.get_window_extent itself)
rather than manually going through text.get_window_extent.
The previous code for finding the closest click was actually wrong
(transAxes.inverted().transform((event.x, event.y)) is in axes space,
but get_offset_transform().transform(get_offsets()) is in screen space,
so they cannot be subtracted from one another) but it didn't really
matter because a click is, in practice, always contained by a single
button anyways (idxs has length at most 1). Still, fix that.
0 commit comments