Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to Bokeh BoxWhisker #6169

Merged
merged 4 commits into from
Apr 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions holoviews/plotting/bokeh/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ class BoxWhiskerPlot(MultiDistributionMixin, CompositeElementPlot, ColorbarPlot,
show_legend = param.Boolean(default=False, doc="""
Whether to show legend for the plot.""")

outlier_radius = param.Number(default=0.01, doc="""
The radius of the circle marker for the outliers.""")

# Deprecated options

color_index = param.ClassSelector(default=None, class_=(str, int),
Expand Down Expand Up @@ -191,11 +194,11 @@ def get_data(self, element, ranges, style):
if self.invert_axes:
vbar_map = {'y': 'index', 'left': 'top', 'right': 'bottom', 'height': width}
seg_map = {'y0': 'x0', 'y1': 'x1', 'x0': 'y0', 'x1': 'y1'}
out_map = {'y': 'index', 'x': vdim}
out_map = {'y': 'index', 'x': vdim, 'radius': self.outlier_radius}
else:
vbar_map = {'x': 'index', 'top': 'top', 'bottom': 'bottom', 'width': width}
seg_map = {'x0': 'x0', 'x1': 'x1', 'y0': 'y0', 'y1': 'y1'}
out_map = {'x': 'index', 'y': vdim}
out_map = {'x': 'index', 'y': vdim, 'radius': self.outlier_radius}
vbar2_map = dict(vbar_map)

# Get color values
Expand All @@ -206,7 +209,7 @@ def get_data(self, element, ranges, style):
cdim, cidx = None, None

factors = []
vdim = element.vdims[0].name
vdim = dimension_sanitizer(element.vdims[0].name)
for key, g in groups.items():
# Compute group label
if element.kdims:
Expand Down
Loading