File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed 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
+
1
4
2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch
2
5
by Neil Crighton. -ADS
3
6
Original file line number Diff line number Diff line change @@ -1334,8 +1334,13 @@ def __call__(self):
1334
1334
vmin , vmax = self .axis .get_view_interval ()
1335
1335
if vmin > vmax :
1336
1336
vmin ,vmax = vmax ,vmin
1337
+ locs = locs [(vmin < locs ) & (locs < vmax )]
1337
1338
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 ))
1339
1344
1340
1345
1341
1346
class OldAutoLocator (Locator ):
You can’t perform that action at this time.
0 commit comments