[英]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. 当我在Bokeh中绘制线图时,我试图显示所有x轴值。
Currently, the output is as follows; 当前,输出如下;
The x-axis range is from 0-10, and I would like all to be displayed. x轴范围是0到10,我希望全部显示出来。
I have seen in a previous solution that p.yaxis.major_label_orientation = "vertical"
worked for the y-axis. 我在先前的解决方案中看到p.yaxis.major_label_orientation = "vertical"
用于y轴。 However this was unsuccessful for the x-axis. 但是,这对于x轴是不成功的。
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))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.