Skip to content

Commit

Permalink
Fix jitter when axes inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and philippjfr committed Jan 12, 2019
1 parent 61ea7d0 commit 757aee0
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions holoviews/plotting/bokeh/chart.py
Expand Up @@ -110,9 +110,12 @@ def get_data(self, element, ranges, style):
style['angle'] = np.deg2rad(style['angle'])

if self.jitter:
axrange = 'y_range' if self.invert_axes else 'x_range'
mapping['x'] = jitter(dims[xidx], self.jitter,
range=self.handles[axrange])
if self.invert_axes:
mapping['y'] = jitter(dims[yidx], self.jitter,
range=self.handles['y_range'])
else:
mapping['x'] = jitter(dims[xidx], self.jitter,
range=self.handles['x_range'])

self._get_hover_data(data, element)
return data, mapping, style
Expand Down Expand Up @@ -306,7 +309,7 @@ class CurvePlot(ElementPlot):

style_opts = line_properties
_nonvectorized_styles = line_properties

_plot_methods = dict(single='line', batched='multi_line')
_batched_style_opts = line_properties

Expand Down

0 comments on commit 757aee0

Please sign in to comment.