How to disable italics font in python when defined xlabel or ylabel using subscript

663 views Asked by At
import matplotlib.pyplot as plt
plt.plot()
plt.xlabel(r'Production$_{world}$')

enter image description here

As shown in image red frame, the word 'World' I don't want it to be italicized.

1

There are 1 answers

0
r-beginners On BEST ANSWER

You can do this by adding font settings.

import matplotlib.pyplot as plt
fig = plt.figure(figsize=(4,3),dpi=144)

plt.plot()
plt.xlabel(r'Production$_\mathrm{world}$')

enter image description here