Skip to content

Commit

Permalink
Only force labels if type no other Element are used
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro committed Sep 29, 2023
1 parent b585a03 commit f520b7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion holoviews/plotting/bokeh/annotation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import itertools
from collections import defaultdict
from html import escape

Expand Down Expand Up @@ -52,7 +53,8 @@ def get_data(self, element, ranges, style):

def initialize_plot(self, ranges=None, plot=None, plots=None, source=None):
figure = super().initialize_plot(ranges=ranges, plot=plot, plots=plots, source=source)
if self.overlaid:
# Only force labels if no other ranges are set
if self.overlaid and set(itertools.chain.from_iterable(ranges)) - {"HSpans", "VSpans", "VLines", "HLines"}:
return figure
labels = "yx" if self.invert_axes else "xy"
for ax, label in zip(figure.axis, labels):
Expand Down

0 comments on commit f520b7d

Please sign in to comment.