对于使用 matplotlib 绘图,如何使 fontsize
小于 matplotlib 的 xx-small
?
非常感谢。
最佳答案
如文档所述,您还可以以磅为单位设置字体大小
。因此,如果您将它设置为 4pt,它会小于 'xx-small'
。
例子:
import matplotlib.pyplot as plt
sizes = [10,8,6,4,'xx-small']
for n,s in enumerate(sizes):
plt.text(0,n,str(s), fontsize=s)
plt.xlim([-0.5, 0.5])
plt.ylim([-1, len(sizes)])
plt.show()
结果:
关于matplotlib - 字体大小小于 matplotlib 的 xx-small,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29000581/