I have draw a map with latitudes labelled but I want to set the fonts as "Times New Roman". How to make it possible?
m.drawparallels(parallels,labels=[1,0,0,0],fontsize=12)
I have draw a map with latitudes labelled but I want to set the fonts as "Times New Roman". How to make it possible?
m.drawparallels(parallels,labels=[1,0,0,0],fontsize=12)
You need to set font family using pyplot
of matplotlib
.
import matplotlib.pyplot as plt
csfont = {'fontname':'Times New Roman'}
// write your code related to basemap here
plt.title('title',**csfont)
plt.show()
You can also use the following to change font globally.
import matplotlib.pyplot as plt
plt.rcParams["font.family"] = "Times New Roman"
Font Family "Times New Roman" not found
, check this answer –
Caryncaryo © 2022 - 2024 — McMap. All rights reserved.