Can't display chinese characters
aschonfeld opened this issue · 1 comments
aschonfeld commented
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.
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
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:
* https://stackoverflow.com/questions/39630928/how-to-plot-a-figure-with-chinese-characters-in-label
* https://jdhao.github.io/2017/05/13/guide-on-how-to-use-chinese-with-matplotlib/