
Hi,
Is it possible to change the y_axis_type via a button? I tried the below code and tried to find the y_axis_type in the list of attributes but cant seem to find it. Anyone have an idea?
import numpy as np
from bokeh.models import CustomJS, RadioButtonGroup
from bokeh.plotting import figure, show
LABELS = ["Log Scale", "Linear Scale"]
p = figure(title="log axis example", y_axis_type="log",
background_fill_color="#fafafa")
x = np.linspace(0.1, 5, 80)
p.line(x, x, legend_label="y=x")
p.circle(x, x, legend_label="y=x")
p.legend.location = "top_left"
radio_button_group = RadioButtonGroup(labels=LABELS, active=0)
radio_button_group.js_on_click(CustomJS(args=dict(p=p), code="""
console.log('radio_button_group: active=' + this.active, this.toString())
console.log(p)
"""))
show(column(p, radio_button_group))
