Solution to the Chinese label cannot be displayed when using matplotlib to draw

Solution to the Chinese label cannot be displayed when using matplotlib to draw

The previous code and graphics display
Insert picture description here
this is because the default font of matplotlib is English font. The
solution is to manually set the default font to Chinese font before drawing.

I demonstrate here that the font is set to Sim-Hei (Sim-Hei).
Below is my improved code and image display:
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_45154565/article/details/109111024