I have a matplotlib plot where on of the x-axis labels has math type in it that I used LaTeX to create. The problem is that the font is italicized and I need it to match the font of the previous text (non-italicized). The code looks as follows:
par2.set_xlabel("Flux ($neutrons/cm^2s)" , fontsize=26 , labelpad = 20)
I found another related (link) question where they suggested adding a \rm and tried the following from it:
plt.xlabel(r'Primary T$_{\rm eff}$')
So that my code would look like:
par2.set_xlabel("Flux ($\rmneutrons/cm^2s)" , fontsize=26 , labelpad = 20)
But all that does is add an 'm' in front of neutrons
How can I get the font non-italicized so that it matches everything else.