Skip to content
Merged
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
9 changes: 5 additions & 4 deletions chaco/color_bar.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ def _draw_plot(self, gc, view_bounds=None, mode='normal'):

mapper = self.index_mapper

scrn_points = arange(mapper.low_pos, mapper.high_pos+1)
low = mapper.low_pos
high = mapper.high_pos
if self.direction == 'flipped':
low, high = high, low
scrn_points = arange(low, high + 1)

# Get the data values associated with the list of screen points.
if mapper.range.low == mapper.range.high:
Expand All @@ -150,9 +154,6 @@ def _draw_plot(self, gc, view_bounds=None, mode='normal'):
else:
data_points = mapper.map_data(scrn_points)

if self.direction == 'flipped':
data_points = data_points[::-1]

# Get the colors associated with the data points.
colors = self.color_mapper.map_screen(data_points)

Expand Down