That works nicely, thanks!
Let’s say I want to keep some padding, though, for better optical results. This DataRange1D class in http://bokeh.pydata.org/en/dev/docs/reference/models/ranges.html should come in handy. In fact, I can add this to the left axis easily like this (overwriting the default value, I suppose):
ydr = DataRange1d(range_padding=0.05)
p = figure(title=“Double vertical axis example”,
x_axis_label=‘Time (h)’, y_axis_label=‘Temp. (°C)’,
But it’s not clear where to add the same for the second (right) axis. I’ve tried in LinearAxis, but no luck. Is that possible, too?
Bryan Van de ven:
So to fix this, you can set the celsius range explicitly so that the initial ranges line up correctly (and the initial ranges are what determines the relative scaling when zooming, e.g). You can do this either by passing
to the figure function call, or by setting the y_range attribute after the fact: