I would like to configure my default options in HoloViews to match those I have been using in my Bokeh plots, but while I can find many equivalents in the HoloViews documentation, I can't figure out what the equivalents are for others.
For example, I have started with the ones I can find in the HoloViews documentation using
opts.defaults(
opts.Scatter(fill_color='black', line_color='gray', fill_alpha=0.1, line_alpha=1.0,
hover_fill_color='yellow', hover_line_color='black', hover_fill_alpha=1.0, hover_line_alpha=1.0,
nonselection_fill_color='gray', nonselection_line_color=None, nonselection_alpha=0.2,
selection_fill_color='black', selection_line_color='white', selection_alpha=1.0,
size=6, line_width=1),
opts.Histogram(fill_color='gray', fill_alpha=0.9, line_width=1, line_color='gray'),
opts.Text(text_color='green')
)
but for many others, especially relating to fonts and control over tick length and colors, I can't find equivalents. In Bokeh I can set these options that I'm interested in for for a given plot with something like
p = figure(...)
# ...
p.xaxis.axis_label = x_label
p.yaxis.axis_label = y_label
p.xaxis.axis_label_text_font = FONT
p.axis.axis_label_text_color = "gray"
p.axis.axis_label_text_font_style = "normal"
p.axis.axis_line_color = "gray"
p.axis.major_label_text_color = "gray"
p.axis.major_tick_line_color = "gray"
p.axis.minor_tick_line_color = "gray"
p.axis.minor_tick_in = 0
p.axis.major_tick_in = 0
p.axis.major_tick_out = 5
p.axis.minor_tick_out = 2
p.grid.grid_line_alpha = 0.5
p.grid.grid_line_dash = [6, 4]
p.title.text_color = "gray"
p.title.text_font = FONT
p.title.text_font_style = "normal"
p.title.align = "center"
p.toolbar.autohide = True
but I'm unsure how to set these in HoloViews using opts.defaults
.
How do I set these options using HoloViews? Is there perhaps some general mechanism to "pass" these Bokeh options to HoloViews in opts.defaults
?