Home > other >  Python 3 Matplotlib drawing under Chinese display garbled
Python 3 Matplotlib drawing under Chinese display garbled

Time:09-22



Jupter editor
The X axis shows square, how to solve? MAC system, need specific steps, thank you

CodePudding user response:

Go ask Python plate

CodePudding user response:

At the beginning of the code introduced:

# matplotlib drawing Chinese display problems
PLT. RcParams [' font. Sans-serif]=[' KaiTi] # specify a default font
PLT. RcParams [' axes. Unicode_minus]=False # to save images is minus sign '-' show up as squares
  • Related