python - Make LaTeX math font same as axis labels in Matplotlib -


i'm using following rcparams change math font axis label default font matplotlib:

plt.rcparams.update({'mathtext.default': 'regular'}) 

the label y-axis on left side of figure below generated latex math expression:

plt.ylabel('concentration ($mol/m^3$)') 

the label y-axis on right side of image generated standard label declaration:

plt.ylabel('concentration (mol/m^3)') 

as can see in figure, when latex used in ylabel string, displayed font different regular label font.

enter image description here

how can make labels created latex math expressions use default matplotlib font?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -