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 pltloads Matplotlib module to use plotting capabilities | .plot(plot specified data | 
| xlabelset label for x-axis | ylabelset label for y-axis | 
| style='italic'use  | .show()render chart in a separate window | 
Usage example
import matplotlib.pyplot as plt
plt.plot([2,1,3])
plt.xlabel('X', style='italic')
plt.ylabel('Y', style='italic')
plt.show()More of Python Matplotlib
- How to plot specific country from world map
- How to plot world map
- How to customize histogram bins
- How to add legend to boxplot
- How to plot 3D heatmap
- How to plot data from CSV
- How to log scale Y axis
- How to plot datetime for x axis
- How to draw a circle with no fill
- How to set more space between subplots
See more codes...
