I am struggling with matplotlib and latex font. I would like to have all in bold and in latex style. I have, consequently done as follows:
import matplotlib
import pandas as pd
import matplotlib.pyplot as plt
plt.rc('font', family='serif',size=32)
matplotlib.rc('text', usetex=True)
matplotlib.rc('legend', fontsize=32)
matplotlib.rcParams['text.latex.preamble'] = r"\usepackage{bm} \usepackage{amsmath}"
fig, ax = plt.subplots(figsize=(22,18))
This is however the result:
I have tried some options, but all seem referring to old matplolib version. I had a look to the official matpltlib page here but I can not understand how to set the bold option. What do you think about?