Bug in ticker.py


I'm posting this to the mailing list first because I'm not sure I've fixed this correctly. This is a patch for a bug in ticker.py.

In Autolocator.get_locator, if the distance passed in is 0, the call to log10 will crash with an overflow error. I think I'm hitting this problem because I plot a lot of binary data, and the first plot when this happened, consisted of all zeros (giving the y axis no distance - I could be talking complete nonsense, I haven't really examined the code). What I'm not sure about is, in the case that distance is 0, should the variable ld be set to 0 (as I have done in the attached patch), or is another value more sensible?

David Moore

ticker.patch (598 Bytes)