Home > other >  Matplotlib Chinese display Mac environment Python programming
Matplotlib Chinese display Mac environment Python programming

Time:11-20

Because Python compiling mode there are two ways: explain the compilation and. One-time compiling py files (all lines), novice recommended explain compilation, directly in the IDEL compiler to write directly, this way is to explain compilation, today I speak Chinese data visualization display scheme is through. One-time compiling py files, the steps are as follows:
1. In the IDEL compiler menu File - create a New File. Py File window, write a certain function of Python scripts in, then save save,
2. Just saved in. Py files start at the top with the code
#! Sur/bin/python3
3. After introducing the Matplotlib framework (used to introduce the framework of an alias for PLT) combined with code:
PLT. RcParams [' font. Sans-serif]=[' Arial Unicode MS]
4. Don't forget to save again. Py files
5. Then run the file will be displayed in Chinese, kiss measuring effective!

Contrast effect:
  • Related