How can I re-generate this example toggling between linear and log scales?
Background: I\'m a long-time Matplotlib user, recent Bokeh user. One of the main reasons
One potential solution is the put both linear and log plots into Tabs like:
from bokeh.plotting import figure, show
from bokeh.models.widgets import Tabs, Panel
panels = []
for axis_type in ["linear", "log"]:
fig = figure(x_axis_type=axis_type, y_axis_type=axis_type)
fig.scatter(x=[1,10,100,1000], y=[1,10,100,1000])
panel = Panel(child=fig, title=axis_type)
panels.append(panel)
tabs = Tabs(tabs=panels)
show(tabs)
Alternatively, you wire up a bokeh.models.widgets.Button
with a CustomJS callback that changes the plot ranges, but the above seems a little easier to me.