python matplotlib set the text size in figure

method

Use the fontsize parameter to change the font size

# Set the legend text size
plt.legend(fontsize=13)

# Set the xy axis name text size
plt.xlabel("xlable", fontsize=15)
plt.ylabel("ylable", fontsize=15)

# Set the xy-axis tick text size
plt.xticks(fontsize=15)
plt.yticks(fontsize=15)
Others will be added later

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324648651&siteId=291194637