1

How does one puts a Log secondary Y axis to a chart with a main Y linear axis ?

I've tried this :

import numpy as np
import bokeh as b
import bokeh.io
from bokeh.models.formatters import *
from bokeh.plotting import figure, show, output_file
from bokeh.models import LinearAxis, LogAxis, DataRange1d


TOOLS = "pan,wheel_zoom,box_zoom,reset,save"

x = np.arange(100)
y1 = np.arange(100)
y2 = np.arange(100)**3
p3 = figure(
    tools=TOOLS, active_scroll="wheel_zoom",
    plot_width=800, plot_height=500,
    title = "TEST")

p3.line(x, y1)

p3.extra_y_ranges = {"log": DataRange1d()}
p3.add_layout(LogAxis(y_range_name="log"), 'right')

p3.line(x, y2, color='#FF0000', y_range_name="log")

show(p3)

But it doesn't work [on my browser] : the left axis is shown only if I zoom, and it appears as a linear axis...

Am I missing something or should I fill a bug ?

hl037_
  • 3,520
  • 1
  • 27
  • 58

1 Answers1

3

Currently bokeh==0.12.10 has problem with log and a linear axis when represented at same time. The bug has been reported. Github Bug Report.

Space Impact
  • 13,085
  • 23
  • 48