我绘制了一张标有纬度的 map ,但我想将字体设置为“Times New Roman”。如何让它成为可能?
m.draw parallels(parallels,labels=[1,0,0,0],font size=12)
最佳答案
您需要使用 matplotlib
的 pyplot
设置字体系列。
import matplotlib.pyplot as plt
csfont = {'fontname':'Times New Roman'}
// write your code related to basemap here
plt.title('title',**csfont)
plt.show()
您还可以使用以下方法全局更改字体。
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "Times New Roman"
关于python - 如何通过 python 中的 drawparallels 将标签字体设置为 "Time New Roman",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40734672/