Revision: 8083 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8083&view=rev Author: astraw Date: 2010-01-16 19:20:03 +0000 (Sat, 16 Jan 2010)
Log Message: ----------- Don't create minor ticks on top of existing major ticks (Neil Crighton). Modified Paths: -------------- trunk/matplotlib/CHANGELOG trunk/matplotlib/lib/matplotlib/ticker.py Modified: trunk/matplotlib/CHANGELOG =================================================================== --- trunk/matplotlib/CHANGELOG 2010-01-16 19:19:14 UTC (rev 8082) +++ trunk/matplotlib/CHANGELOG 2010-01-16 19:20:03 UTC (rev 8083) @@ -1,3 +1,6 @@ +2009-01-16 Don't create minor ticks on top of existing major + ticks. Patch by Neil Crighton. -ADS + 2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch by Neil Crighton. -ADS Modified: trunk/matplotlib/lib/matplotlib/ticker.py =================================================================== --- trunk/matplotlib/lib/matplotlib/ticker.py 2010-01-16 19:19:14 UTC (rev 8082) +++ trunk/matplotlib/lib/matplotlib/ticker.py 2010-01-16 19:20:03 UTC (rev 8083) @@ -1334,10 +1334,15 @@ vmin, vmax = self.axis.get_view_interval() if vmin > vmax: vmin,vmax = vmax,vmin + locs = locs[(vmin < locs) & (locs < vmax)] - return self.raise_if_exceeds(locs[(vmin < locs) & (locs < vmax)]) + # don't create minor ticks on top of existing major ticks + diff = 0.5 * abs(locs[1] - locs[0]) + locs = [l for l in locs if (np.abs(l - majorlocs) > diff).all()] + return self.raise_if_exceeds(np.array(locs)) + class OldAutoLocator(Locator): """ On autoscale this class picks the best MultipleLocator to set the This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ Matplotlib-checkins mailing list Matplotlib-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins