Skip to content

Commit

Permalink
No longer applying invert_axes swap in _init_plot
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Jun 27, 2023
1 parent ae23b1f commit 9da6195
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,27 +499,25 @@ def _init_plot(self, key, element, plots, ranges=None):

axis_specs = {'x': {}, 'y': {}}
if self.invert_axes:
x, y = 'y', 'x'
axpos0, axpos1 = 'below', 'above'
else:
x, y = 'x', 'y'
axpos0, axpos1 = 'left', 'right'
axis_specs[x]['x'] = self._axis_props(plots, subplots, element, ranges, pos=0)
axis_specs['x']['x'] = self._axis_props(plots, subplots, element, ranges, pos=0)
if self.multi_y:
yaxes, dimensions = {}, {}
for el in element:
yd = el.get_dimension(1)
dimensions[yd.name] = yd
opts = el.opts.get('plot', backend='bokeh').kwargs
if yd.name not in yaxes:
yaxes[yd.name] = opts.get(f'{y}axis', axpos1 if len(yaxes) else axpos0)
yaxes[yd.name] = opts.get(f'yaxis', axpos1 if len(yaxes) else axpos0)

for ydim, position in yaxes.items():
axis_specs[y][ydim] = self._axis_props(
axis_specs['y'][ydim] = self._axis_props(
plots, subplots, element, ranges, pos=1, dim=dimensions[ydim]
)
else:
axis_specs[y]['y'] = self._axis_props(plots, subplots, element, ranges, pos=1)
axis_specs['y']['y'] = self._axis_props(plots, subplots, element, ranges, pos=1)

properties = {}
for axis, axis_spec in axis_specs.items():
Expand Down Expand Up @@ -847,9 +845,6 @@ def _update_ranges(self, element, ranges):
x_range = self.handles['x_range']
y_range = self.handles['y_range']

if isinstance(self, OverlayPlot):
x_range, y_range = (y_range, x_range) if self.invert_axes else (x_range, y_range)

self._update_main_ranges(element, x_range, y_range, ranges)

# ALERT: extra ranges need shared, logx, and stream handling
Expand Down

0 comments on commit 9da6195

Please sign in to comment.