9951 explained code solutions for 126 technologies


python-matplotlibHow to change font to Arial


import matplotlib.pyplot as plt
plt.plot([2,1,3])
plt.title('Other Font', fontname='Arial')
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

title

set chart title

fontname

set font face from the list of supported fonts

.show()

render chart in a separate window