Muhammad Awais
Muhammad Awais

Reputation: 365

How to show values in minor tickers in Bokeh 1.1.0

I want to add labels on minor tickers in Bokeh (1.1.0), Would you please guide me how to do that ? here is the image attached here is the image attached.

Upvotes: 1

Views: 159

Answers (1)

Eugene Pakhomov
Eugene Pakhomov

Reputation: 10727

It's impossible to add labels to the minor ticks. But you can increase the number of the major ticks:

from bokeh.plotting import figure
from bokeh.plotting import show

p = figure()
p.line([0, 20], [0, 20])

# The default value is 6.
p.xaxis.ticker.desired_num_ticks = 12

show(p)

Upvotes: 2

Related Questions