I found a lot of methods to solve the Chinese garbled code of Matplotlib in Anaconda on the Internet. I feel it is not concise enough. Now let’s make a summary. Two steps, one is to find the font, the other is to set it.
The system font file is usually saved in the C:\Windows\Fonts
Open copy any font:
Save it in the TTF folder. Lu Jin’s name is e::’anaconda ‘,’lib’,’site-packages’,’matplotlib ‘,’mpl-data’,’fonts’,’ttf ‘
You can change the file name of Anaconda installed on your computer, and the following path is the same.
So the font is chosen.
Go back to MPL data and open the matplotlibrc file: e:// Anaconda/lib/site packages/Matplotlib/MPL data
Notepad shows about 249 lines, the upper middle part of the file:
Remove the comment in front of font. Family, and then change the following name to the newly copied font name: simhei.
Save with Ctrl + s and reopen the compiler.
- Solution of Chinese garbled code when using QT
- Solution of Chinese display garbled code in Git Bash
- Python Anaconda Spyder can’t display pictures by using Matplotlib. Error report solution: figures now render in the plots pane by default. To mak
- Solution to the problem of Chinese garbled in gradle console in idea
- Python – [encoding] in Python os.system Solution to Chinese garbled code when calling CMD command
- “Typeerror: invalid dimensions for image data” in Matplotlib drawing imshow() function
- Resttemplate Chinese garbled problem – available
- Chinese garbled fonts in win10 English system
- The problem of Chinese garbled data in MySQL
- Solve the problem of Chinese garbled code of actibpm plug-in in idea
- Solving the problem of Chinese garbled code in qtring
- Solving Chinese garbled code in Java compressed file
- After Oracle 11g is installed, SQL_ Plus.exe The problem of Chinese garbled in command window
- Chinese garbled code when vscode calls CMD to run C / C + +
- Solve the problem of using logback console to print log Chinese characters in IDEA as garbled characters
- Install anaconda error: failed to create anaconda menus
- Solution of MySQL data garbled problem
- Opencv453 drawing rectangle function error reporting solution
- matplotlib 1.3.1 requires nose, which is not installed. matplotlib 1.3.1 requires tornado, which is
- Solution to abnormal errors during startup of Python’s Anaconda