enthought/chaco — Issue #34: zooming out with in a log plot results in an exception
Author: pberkes
Created: 2011-11-29 13:21:22+00:00
State: open
Labels: defect

The problem is that the lower bound of the range becomes negative:

Traceback (most recent call last):
File "/Users/pberkes/egit/ETS/enable/enable/wx/quartz.py", line 99, in _paint
self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))
File "/Users/pberkes/egit/ETS/enable/enable/component.py", line 427, in draw
self._draw(gc, view_bounds, mode)
File "/Users/pberkes/egit/ETS/enable/enable/component.py", line 747, in _draw
self._dispatch_draw(layer, bb, view_bounds, mode)
File "/Users/pberkes/egit/ETS/enable/enable/container.py", line 312, in _dispatch_draw
my_handler(gc, view_bounds, mode)
File "/Users/pberkes/egit/ETS/enable/enable/container.py", line 352, in _draw_container_underlay
self._draw_underlay(gc, view_bounds, mode)
File "/Users/pberkes/egit/ETS/enable/enable/component.py", line 865, in _draw_underlay
underlay.overlay(self, gc, view_bounds, mode)
File "/Users/pberkes/egit/ETS/chaco/chaco/grid.py", line 305, in overlay
self._compute_ticks(other_component)
File "/Users/pberkes/egit/ETS/chaco/chaco/grid.py", line 253, in _compute_ticks
scale=scale)
File "/Users/pberkes/egit/ETS/chaco/chaco/scales_tick_generator.py", line 27, in get_ticks
ticks = self.scale.ticks(data_low, data_high)
File "/Users/pberkes/egit/ETS/chaco/chaco/scales/scales.py", line 443, in ticks
scale = self._get_scale(start, end, numticks)
File "/Users/pberkes/egit/ETS/chaco/chaco/scales/scales.py", line 526, in _get_scale
closest_scale = self._get_scale_np(start, end, numticks)
File "/Users/pberkes/egit/ETS/chaco/chaco/scales/scales.py", line 549, in _get_scale_np
scale_intervals = array([s.num_ticks(start, end, numticks) for s in self.scales])
File "/Users/pberkes/egit/ETS/chaco/chaco/scales/scales.py", line 382, in num_ticks
return len(self.ticks(start, end, desired_ticks))
File "/Users/pberkes/egit/ETS/chaco/chaco/scales/scales.py", line 344, in ticks
log_start = log10(start)
ValueError: math domain error