Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
binaryinspace opened this issue Mar 11, 2024 · 1 comment
Open

Comments

@binaryinspace
Copy link

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

@lmcinnes
Copy link
Contributor

lmcinnes commented Mar 11, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants