【Python, bokeh】 軸に文字列を使用する → 「x_range」を使用する
1. コード
from bokeh.plotting import figure, output_file, show, reset_output
# x軸と表示データ(y)の作成
x = []# ←すみません、都合上全角なので半角に直してください
y = []# 同上
for cnt in range(10):
x.append("x" + str(cnt))
y.append(cnt)
# ['x0', 'x1', 'x2', 'x3', 'x4', 'x5', 'x6', 'x7', 'x8', 'x9']
# [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
# x軸を設定
p = figure(x_range=x)
# x軸を縦書きにする
p.xaxis.major_label_orientation = math.pi/2
# プロット
p.line(x, y, legend_label="y")
# グラフ表示
show(p)