Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想更改图片上标记的指数 字体大小我不能使用 matplotlib.rc('font', **font) 方法,因为我有不同的绘图需要不同的字体大小,所以我单独更改每个元素。但是,我找不到指数的字体属性。
如果指数是由您offset计算的,matplotlib您可以执行以下操作将指数的字体大小更改为30
offset
matplotlib
30
import matplotlib.pyplot as plt import numpy as np x = np.linspace(1,1.0001,100) fig = plt.figure() ax = fig.add_subplot(111) ax.plot(x) t = ax.yaxis.get_offset_text() t.set_size(30) plt.show()