matplotlib: plt.rcParams sets the resolution, size and other information of the drawing. The main function is to set the resolution, size and other information of the drawn picture:
1: plt.rcParams['figure.figsize'] = (8.0, 4.0)
# Set figure_size size
2: plt.rcParams['image.interpolation'] = 'nearest'
# Set interpolation style
3: plt.rcParams['image.cmap'] = 'gray'
# Set the color style
besides:
1: ## figsize(12.5, 4)
set figsize
2: plt.rcParams['savefig.dpi'] = 300
# image pixels
3: plt.rcParams['figure.dpi']
= 300 # resolution
4: # Default pixel: [6.0,4.0], resolution is 100, picture size is 600&400
5: # specify dpi = 200, the image size is 1200*800
6: # specify dpi = 300, the picture size is 1800*1200
7: # Set figsize to change the scale without changing the resolution