Skip to content

Commit

Permalink
Merge pull request #899 from ioam/bokeh_font_size
Browse files Browse the repository at this point in the history
Avoid deprecation warnings in bokeh 0.12.3
  • Loading branch information
jlstevens authored Oct 5, 2016
2 parents 003d710 + 138b29f commit 1ae66c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions holoviews/plotting/bokeh/element.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import numpy as np
import bokeh
import bokeh.plotting
from bokeh.core.properties import value
from bokeh.models import Range, HoverTool, Renderer
from bokeh.models.tickers import Ticker, BasicTicker, FixedTicker
from bokeh.models.widgets import Panel, Tabs
Expand Down Expand Up @@ -374,6 +375,7 @@ def _title_properties(self, key, plot, element):
return dict(title=title, title_text_color='black', **title_font)
else:
title_font = self._fontsize('title', 'text_font_size')
title_font['text_font_size'] = value(title_font['text_font_size'])
return dict(text=title, text_color='black', **title_font)


Expand Down Expand Up @@ -407,7 +409,7 @@ def _axis_properties(self, axis, key, plot, dimension,
if ((axis == 'x' and self.xaxis in ['bottom-bare', 'top-bare']) or
(axis == 'y' and self.yaxis in ['left-bare', 'right-bare'])):
axis_props['axis_label'] = ''
axis_props['major_label_text_font_size'] = '0pt'
axis_props['major_label_text_font_size'] = value('0pt')
axis_props['major_tick_line_color'] = None
axis_props['minor_tick_line_color'] = None
else:
Expand Down Expand Up @@ -957,7 +959,7 @@ def _process_legend(self):
plot.legend[0].set(**options)
legend_fontsize = self._fontsize('legend', 'size').get('size',False)
if legend_fontsize:
plot.legend[0].label_text_font_size = legend_fontsize
plot.legend[0].label_text_font_size = value(legend_fontsize)

if self.legend_position not in self.legend_specs:
plot.legend.location = self.legend_position
Expand Down

0 comments on commit 1ae66c0

Please sign in to comment.