9951 explained code solutions for 126 technologies


python-matplotlibHow to set font style to italic


import matplotlib as mpl
import matplotlib.pyplot as plt

mpl.rc('font', style='italic')
plt.plot([2,1,3])

plt.show()ctrl + c
import matplotlib.pyplot as plt

loads Matplotlib module to use plotting capabilities

mpl.rc

manage configuration

font

change font settings

style

set font style (italic in our case)

.plot(

plot specified data

.show()

render chart in a separate window