9951 explained code solutions for 126 technologies


python-matplotlibHow to use LaTeX font


import matplotlib.pyplot as plt

plt.plot([2,1,3])
plt.rcParams.update({
    "text.usetex": True,
    "font.family": "monospace"})
plt.title('Other Font')
plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

title

set chart title

.rcParams.update

update plot configuration

text.usetex

enables LaTeX usage

font.family

specify font to use

.show()

render chart in a separate window