enthought / enthought/chaco

zooming out in a log plot results in an exception

Open
#34 1 comment 0 reactions 0 assignees View on GitHub
type: bug
Dominant language
Python
Stars
305
Forks
97
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.