增加散景轴刻度字体大小和 属性 到粗体

increase bokeh axis ticks font size and property to bold

如何更改轴标记的字体大小并为下图加粗?图是用 python 中的散景库绘制的。有没有办法像 gcf 那样获取图像的属性,我们可以在其中附加新值?

您需要名称以 major_label_text_ 开头的轴属性。文档:https://docs.bokeh.org/en/latest/docs/reference/models/axes.html#bokeh.models.axes.Axis.major_label_standoff

一些例子:

from bokeh.plotting import figure, show

p1 = figure()
p1.xaxis.major_label_text_color = 'red'
p1.xaxis.major_label_text_font_size = '20px'
p1.line([0, 1], [0, 1])

show(p1)