9951 explained code solutions for 126 technologies


python-matplotlibHow to change font


import matplotlib.pyplot as plt
plt.plot([2,1,3])
plt.title('Other Font', fontname='monospace')
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