ResidentMario / missingno

Missing data visualization module for Python.
MIT License
3.9k stars 516 forks source link

Can't display chinese characters #155

Closed aschonfeld closed 2 years ago

aschonfeld commented 2 years ago

Hi, I was given an issue in D-Tale Missing Analysis chart not able to show Chinese Characters but upon further inspection it appears to be an issue with missingno.

image

Here's some test data to replicate the issue:

import numpy as np
import pandas as pd

df = pd.DataFrame({
                '日期': ['2015-01-07', '2014-12-17', '2015-01-21', '2014-11-19', '2015-01-17',
                                      '2015-02-26', '2015-01-04', '2014-12-20', '2014-12-07', '2015-01-06'],
                '股票代码': ['600795', '600268', '002428', '600031', '002736', '600216', '000799', '601600',
                        '601939', np.nan]
})
ResidentMario commented 2 years ago

This is just set_xlabel / set_ylabel and friends in matplotlib, the graphing library that missingno uses. Surprisingly, it seems that matplotlib requires additional properties to be set in order to support Chinese characters. These posts explain: