Issue 807 auto minor locator #961

Merged
merged 1 commit into from Jun 30, 2012

Projects

None yet

2 participants

@WeatherGod
Matplotlib Developers member

Possible bugfix for issue #807.

@jdh2358

I can duplicate the error in issue 807, but when I run with your patch, although it prevents the crash, I still get lots of warnings:

msierig@pinchiepie:~> python test.py
/home/msierig/dev/lib/python2.7/site-packages/matplotlib/ticker.py:1557: RuntimeWarning: divide by zero encountered in double_scalars
  tmin = np.ceil((vmin - t0) / minorstep) * minorstep
/home/msierig/dev/lib/python2.7/site-packages/matplotlib/ticker.py:1557: RuntimeWarning: invalid value encountered in double_scalars
  tmin = np.ceil((vmin - t0) / minorstep) * minorstep
/home/msierig/dev/lib/python2.7/site-packages/matplotlib/ticker.py:1558: RuntimeWarning: divide by zero encountered in double_scalars
  tmax = np.floor((vmax - t0) / minorstep) * minorstep
/home/msierig/dev/lib/python2.7/site-packages/matplotlib/ticker.py:1558: RuntimeWarning: invalid value encountered in double_scalars
  tmax = np.floor((vmax - t0) / minorstep) * minorstep
@jdh2358

I'm going to merge this now because it is an improvement over what we have and it fixes a legitimate bug. There may be better solutions out there but we can clean later. I need to get 1.1.1 out today for the debian release freeze so I am going to include this.

@jdh2358 jdh2358 merged commit 7e47149 into matplotlib:v1.1.x Jun 30, 2012
@WeatherGod WeatherGod deleted the WeatherGod:issue-807-AutoMinorLocator branch Jul 23, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment