简体   繁体   中英

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;

在此处输入图片说明

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.

Use:

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

or the more explicit:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM