TutteInstitute/datamapplot

In the process of using, Chinese characters cannot be displayed.

binaryinspace opened this issue · 1 comments

First of all, thank you very much for this project. During my usage, I have already adjusted Matplotlib to display Chinese characters properly, but in DataMapPlot, Chinese characters cannot be displayed correctly, and I can only see boxes instead. I really appreciate your response.
khl20230929201241422

I think this is an issue with the font used not supporting chinese characters. Note that DataMapPlot does not use the default matplotlib font -- you will need to actually specify the right font to use for DataMapPlot.

You can select the font, both for labels, and for the title and subtitle, via the fontfamily keyword argument and via the title_keywords and sub_title_keywords arguments that take dictionaries where you can specify the font (again via fontfamily). If you select a font on your system that does display the characters correctly then it should all work.