Skip to content

Commit 2a41fbe

Browse files
committed
Ensure three minor ticks always drawn (SF# 2924245). Patch by Neil Crighton.
svn path=/trunk/matplotlib/; revision=8082
1 parent e5bc430 commit 2a41fbe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2009-01-16 Ensure three minor ticks always drawn (SF# 2924245). Patch
2+
by Neil Crighton. -ADS
3+
14
2010-01-16 Applied patch by Ian Thomas to fix two contouring
25
problems: now contourf handles interior masked regions,
36
and the boundaries of line and filled contours coincide. - EF

lib/matplotlib/ticker.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,15 +1320,13 @@ def __call__(self):
13201320
except IndexError:
13211321
raise ValueError('Need at least two major ticks to find minor '
13221322
'tick locations')
1323-
# see whether major step should be divided by 5, 4 or 2. This
1323+
# see whether major step should be divided by 5, 4. This
13241324
# should cover most cases.
13251325
temp = float(('%e' % majorstep).split('e')[0])
13261326
if temp % 5 < 1e-10:
13271327
minorstep = majorstep / 5.
1328-
elif temp % 2 < 1e-10:
1329-
minorstep = majorstep / 4.
13301328
else:
1331-
minorstep = majorstep / 2.
1329+
minorstep = majorstep / 4.
13321330

13331331
tmin = majorlocs[0] - majorstep
13341332
tmax = majorlocs[-1] + majorstep

0 commit comments

Comments
 (0)