-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
bugSomething isn't workingSomething isn't working
Description
On a whim, I asked Claude if it could fix the missing background color problems in theme_colors_bokeh()
It only hallucinated one key:
AttributeError: unexpected attribute 'text_color' to Legend, similar attributes are title_text_color, label_text_color or inactive_hatch_color
Here is the code with Claude's recommended fixes, and that key fixed as suggested in the error.
Seems to do it!
def theme_colors_bokeh(bg, fg):
from bokeh.io import curdoc
from bokeh.themes import Theme
curdoc().theme = Theme(
json={
"attrs": {
"figure": {
"background_fill_color": bg, # plot area
"border_fill_color": bg, # area between plot and outer edge
"outline_line_color": fg, # border around the plot
},
"Grid": {
"grid_line_color": fg,
"grid_line_alpha": 0.2, # make grid lines subtle
},
"Title": {
"background_fill_color": bg,
"text_color": fg,
},
"Axis": {
"background_fill_color": bg,
"axis_label_text_color": fg,
"major_label_text_color": fg,
"axis_line_color": fg, # axis line color
"major_tick_line_color": fg, # tick marks
"minor_tick_line_color": fg,
},
"Legend": {
"background_fill_color": bg,
"title_text_color": fg,
"label_text_color": fg,
"border_line_color": fg,
"border_line_alpha": 0.2,
}
}
}
)Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working