Matplotlib and Seaborn Chinese problem

 

Matplotlib Chinese problem

plt.rcParams [ 'font.sans-serif'] = [ 'SimHei'] # Chinese that the problem solving - set the font to bold
plt.rcParams [ 'axes.unicode_minus'] = False # resolved images are saved negative '-' display problems for the box

 

Seaborn Chinese problem

plt.rcParams [ 'font.sans-serif'] = [ 'SimHei'] # Chinese font set - bold
plt.rcParams [ 'axes.unicode_minus'] = False # resolved images are saved negative '-' is displayed as box problem
sns.set (font = 'SimHei') # resolve Seaborn Chinese display problems

 

Guess you like

Origin www.cnblogs.com/jianchiai/p/11373805.html