From 5649eb7f906a9c82e9948d952ced925eeee384b0 Mon Sep 17 00:00:00 2001 From: Theom <49269671+TheoMathurin@users.noreply.github.com> Date: Fri, 9 Jun 2023 17:07:53 +0200 Subject: [PATCH] Fix bins option in autompg_histogram demo (#5750) --- examples/gallery/demos/bokeh/autompg_histogram.ipynb | 2 +- holoviews/plotting/bokeh/chart.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/examples/gallery/demos/bokeh/autompg_histogram.ipynb b/examples/gallery/demos/bokeh/autompg_histogram.ipynb index c129651801..89daa509c9 100644 --- a/examples/gallery/demos/bokeh/autompg_histogram.ipynb +++ b/examples/gallery/demos/bokeh/autompg_histogram.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "hist = autompg_ds.hist(dimension='mpg', groupby='cyl', bin_range=(9, 46), bins=40, adjoin=False)\n", + "hist = autompg_ds.hist(dimension='mpg', groupby='cyl', bin_range=(9, 46), num_bins=40, adjoin=False)\n", "\n", "hist.opts(opts.Histogram(alpha=0.9, width=600))" ] diff --git a/holoviews/plotting/bokeh/chart.py b/holoviews/plotting/bokeh/chart.py index a3896ea44a..bdb8ae50dd 100644 --- a/holoviews/plotting/bokeh/chart.py +++ b/holoviews/plotting/bokeh/chart.py @@ -797,7 +797,12 @@ def _axis_properties(self, axis, key, plot, dimension=None, ((not self.invert_axes and axis == 'x') or (self.invert_axes and axis =='y'))): props['separator_line_width'] = 0 props['major_tick_line_alpha'] = 0 - props['major_label_text_font_size'] = '0pt' + # The major_label_text_* is a workaround for 0pt font size not working in Safari. + # See: https://github.com/holoviz/holoviews/issues/5672 + props['major_label_text_font_size'] = '1px' + props['major_label_text_alpha'] = 0 + props['major_label_text_line_height'] = 0 + props['group_text_color'] = 'black' props['group_text_font_style'] = "normal" if axis == 'x':