diff --git a/holoviews/plotting/bokeh/element.py b/holoviews/plotting/bokeh/element.py index 06d2bf4225..bbb1fd85a4 100644 --- a/holoviews/plotting/bokeh/element.py +++ b/holoviews/plotting/bokeh/element.py @@ -567,10 +567,10 @@ def _update_range(self, axis_range, low, high, factors, invert, shared, log, str offset = abs(low*0.1 if low else 0.5) low -= offset high += offset - if invert: low, high = high, low if shared: shared = (axis_range.start, axis_range.end) low, high = util.max_range([(low, high), shared]) + if invert: low, high = high, low if not isinstance(low, util.datetime_types) and log and (low is None or low <= 0): low = 0.01 if high < 0.01 else 10**(np.log10(high)-2) self.warning("Logarithmic axis range encountered value less than or equal to zero, " diff --git a/holoviews/tests/plotting/bokeh/testlayoutplot.py b/holoviews/tests/plotting/bokeh/testlayoutplot.py index d8fd4928ad..6f0e992a71 100644 --- a/holoviews/tests/plotting/bokeh/testlayoutplot.py +++ b/holoviews/tests/plotting/bokeh/testlayoutplot.py @@ -239,3 +239,11 @@ def test_layout_disable_toolbar(self): plot = bokeh_renderer.get_plot(layout) self.assertIsInstance(plot.state, Column) self.assertEqual(len(plot.state.children), 1) + + def test_layout_shared_inverted_yaxis(self): + layout = (Curve([]) + Curve([])).options('Curve', invert_yaxis=True) + plot = bokeh_renderer.get_plot(layout) + subplot = list(plot.subplots.values())[0].subplots['main'] + self.assertEqual(subplot.handles['y_range'].start, 1) + self.assertEqual(subplot.handles['y_range'].end, 0) +