Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chaco/plotscrollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _handle_dataspace_update(self):
else:
ticksize = 1
foo = (totalmin, totalmax, view, ticksize)
print("scrollrange:", foo)

self.trait_setq(
range=foo,
scroll_position=max(
Expand Down
35 changes: 1 addition & 34 deletions chaco/tests/test_colormapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from chaco.api import ArrayDataSource, ColorMapper, DataRange1D


class LinearSegmentedColormapTestCase(unittest.TestCase):
class ColormapperTestCase(unittest.TestCase):
def setUp(self):
""" Set up called before each test case. """

Expand Down Expand Up @@ -130,36 +130,3 @@ def test_no_alpha(self):
"red": [(0.0, 0.0, 0.0), (1.0, 1.0, 1.0)],
}
assert self.colormap._segmentdata == sd


## def test_no_interpolation(self):
## grayscale_colors = array([[0.0,0.0,0.0,1.0], [1.0, 1.0, 1.0, 1.0]])
## grayscale_bins = array([0.0, 1.0])
## grayscale_steps = array([1])

## colormap = LinearSegmentedColormap(
## grayscale_colors, grayscale_bins, grayscale_steps
## )

## a = array([0.0, 0.25, 0.75, 1.0])
## b = colormap.map_array(a)
## result = ravel(b[:,:1])
## expected = array([0.0, 0.0, 1.0, 1.0])

## close = allclose(result, expected, atol=0.02)
## self.assert_(close,
## "Map with no interpolation broken. Expected %s. Got %s" % (expected, result))

## def test_value_bands(self):

## grayscale_colors = array([[0.0,0.0,0.0,1.0], [1.0, 1.0, 1.0, 1.0]])
## grayscale_bins = array([0.0, 1.0])
## grayscale_steps = array([1])

## colormap = LinearSegmentedColormap(
## grayscale_colors, grayscale_bins, grayscale_steps
## )

## colormap._recalculate()

## print '**************', colormap._color_bands, colormap._value_bands
Comment thread
rahulporuri marked this conversation as resolved.
1 change: 0 additions & 1 deletion examples/demo/nonlinear_color_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,5 @@ def _colorbar_scale_changed(self):
domain_bounds=(0.0, 0.0, 2.0, 2.0),
grid_size=(200, 200),
)
# print "data bounds: ", grid.data_min, grid.data_max
demo = DataGridView(model=grid)
demo.configure_traits()