Revision: 8106 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8106&view=rev Author: jdh2358 Date: 2010-02-01 22:46:30 +0000 (Mon, 01 Feb 2010)
Log Message: ----------- support picking of axes objects outside their bounding box Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/artist.py Modified: trunk/matplotlib/lib/matplotlib/artist.py =================================================================== --- trunk/matplotlib/lib/matplotlib/artist.py 2010-01-29 18:03:13 UTC (rev 8105) +++ trunk/matplotlib/lib/matplotlib/artist.py 2010-02-01 22:46:30 UTC (rev 8106) @@ -320,7 +320,11 @@ for a in self.get_children(): # make sure the event happened in the same axes ax = getattr(a, 'axes', None) - if mouseevent.inaxes==ax: + if mouseevent.inaxes is None or mouseevent.inaxes==ax: + # we need to check if mouseevent.inaxes is None + # because some objects associated with an axes (eg a + # tick label) can be outside the bounding box of the + # axes and inaxes will be None a.pick(mouseevent) def set_picker(self, picker): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins