Skip to content

Instantly share code, notes, and snippets.

@adivekar-utexas
Created September 3, 2025 10:39
Show Gist options
  • Save adivekar-utexas/5ae6bc7c4190bf90d66620544fc169d4 to your computer and use it in GitHub Desktop.
Save adivekar-utexas/5ae6bc7c4190bf90d66620544fc169d4 to your computer and use it in GitHub Desktop.
Hvplot Bokeh theme - The Good One
import pandas as pd
import hvplot
import holoviews as hv
import hvplot.pandas
hvplot.extension("bokeh")
from bokeh.themes.theme import Theme
hv.renderer('bokeh').theme = Theme(json={
'attrs': {
'Figure': {
'background_fill_color': '#2F2F2F',
'border_fill_color': '#2F2F2F',
'outline_line_color': '#444444',
},
'Grid': {
# 'grid_line_dash': [6, 4],
'grid_line_alpha': 0.9,
},
'Axis': {
'axis_label_text_font_style': 'normal',
'axis_label_text_font_size': '15px',
'axis_label_text_color': '#444444',
'major_label_text_font_style': 'normal',
'major_label_text_font_size': '13px',
'major_label_text_color': '#888888',
},
'Legend': {
'title': '',
'title_text_font': 'Helvetica',
'label_text_font': 'Helvetica',
'border_line_color': '#49483E',
'label_text_color': '#666666',
'label_text_line_height': 0.7,
'title_text_line_height': 0.7,
'label_text_font_style': 'normal',
'title_text_font_style': 'bold',
'background_fill_alpha': 0.9,
'margin': 0,
'padding': 5,
'label_width': 10,
},
'Title': {
'text_font': 'Helvetica',
'text_font_size': '16px',
'text_color': '#444444',
'text_font_style': 'bold',
},
'VBar': {
'line_color': None,
},
'HBar': {
'line_color': None,
}
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment