man-group/dtale

Missing Analysis chart not able to show Chinese Characters

automano opened this issue · 5 comments

I try to use the Missing Analysis in dtale, but chart not able to show Chinese characters. And headers of my csv file are Chinese characters title. In chart, they are all blank.

The dtale and python version:

dtale 1.61.1
python 3.8.12

Snipaste_2021-12-09_15-42-26

@automano I dug a little deeper and found that this is an issue with the missingno package in python. I've passed the issue over to them ResidentMario/missingno#155

missingno uses matplotlib, and matplotlib uses a default font that doesn't define Chinese glyphs.

In order to fix this, follow the instructions here and/or here.

While this is a little surprising, I am not in support of messing with the font choices matplotlib makes in missingno. Afraid you'll have to use a workaround.

Ah, I see this is an online GUI tool. In that case @aschonfeld you can probably fiddle with the relevant settings.

@ResidentMario thanks for the tip, I was able to solve it using the following:

import matplotlib
import matplotlib.pyplot as plt

plt.rcParams["font.sans-serif"] = ["SimHei"]  # Or any other Chinese characters
matplotlib.rcParams["font.family"] = ["Heiti TC"]

@automano just release v2.1.0 with this fix. Let me know if you have any other issues