moe_95
moe_95

Reputation: 417

Show all x-axis values on plot - Bokeh

I am attempting to show all x-axis values when I plot a line-graph in Bokeh.

Currently, the output is as follows;

enter image description here

The x-axis range is from 0-10, and I would like all to be displayed.

I have seen in a previous solution that p.yaxis.major_label_orientation = "vertical" worked for the y-axis. However this was unsuccessful for the x-axis.

Any assistance that anyone could provide would be greatly appreciated.

Upvotes: 1

Views: 2325

Answers (1)

bigreddot
bigreddot

Reputation: 34618

Use:

p.xaxis.ticker = list(range(1, 12))

or the more explicit:

p.xaxis.ticker = FixedTicker(ticks=list(range(1, 12))

Upvotes: 3

Related Questions