简体   繁体   English

Python 散景绘图工具 - 更改代码的字体大小(X 和 Y 轴)

[英]Python Bokeh plotting tool - Changing the font size of the ticker(both X and Y axis)

The problem which traps me is that I want to enlarge the font size in the ticker on both x and y-axis.困扰我的问题是我想在 x 轴和 y 轴上放大代码中的字体大小。

I am using the Bokeh as the tool for plotting.我使用散景作为绘图工具。 I can generate a neat plot now.我现在可以生成一个整洁的 plot。 But the ticker is way too small.但是代码太小了。 As I went through google, I hardly find the solution.当我浏览谷歌时,我几乎找不到解决方案。 Huge thank.非常感谢。 (Enlarge the font size within the red box) (放大红框内的字号)

在此处输入图像描述

You need the major_label_text_font_size attribute:您需要major_label_text_font_size属性:

from bokeh.io import show
from bokeh.plotting import figure

p = figure()
p.circle(0, 0)
p.xaxis.major_label_text_font_size = "20px"

show(p)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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