9951 explained code solutions for 126 technologies


python-matplotlibHow to set italic font for labels


import matplotlib.pyplot as plt

plt.plot([2,1,3])
plt.xlabel('X', style='italic')
plt.ylabel('Y', style='italic')

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

loads Matplotlib module to use plotting capabilities

.plot(

plot specified data

xlabel

set label for x-axis

ylabel

set label for y-axis

style='italic'

use italic font style

.show()

render chart in a separate window