Fix jitter when axes inverted
@@ -110,9 +110,12 @@ class PointPlot(LegendPlot, ColorbarPlot):
style['angle'] = np.deg2rad(style['angle'])
if self.jitter:
- axrange = 'y_range' if self.invert_axes else 'x_range'
+ 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[axrange])
+ range=self.handles['x_range'])
self._get_hover_data(data, element)
return data, mapping, style
