File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ 2009-01-16 Don't create minor ticks on top of existing major
2+ ticks. Patch by Neil Crighton. -ADS
3+
142009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch
25 by Neil Crighton. -ADS
36
Original file line number Diff line number Diff line change @@ -1334,8 +1334,13 @@ def __call__(self):
13341334 vmin , vmax = self .axis .get_view_interval ()
13351335 if vmin > vmax :
13361336 vmin ,vmax = vmax ,vmin
1337+ locs = locs [(vmin < locs ) & (locs < vmax )]
13371338
1338- return self .raise_if_exceeds (locs [(vmin < locs ) & (locs < vmax )])
1339+ # don't create minor ticks on top of existing major ticks
1340+ diff = 0.5 * abs (locs [1 ] - locs [0 ])
1341+ locs = [l for l in locs if (np .abs (l - majorlocs ) > diff ).all ()]
1342+
1343+ return self .raise_if_exceeds (np .array (locs ))
13391344
13401345
13411346class OldAutoLocator (Locator ):
You can’t perform that action at this time.
0 commit comments