-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
[intro_demand_supply] Bug in matplotlib #30
Comments
Hi Matt @mmcky , Thanks for point this out. I'll try to fix this. After using @HumphreyYang's method, the issue persist. In my local jupyter notebook, it looks okay. But when I view the deployment online it still doesn't work. Best, |
In addition to adding the code in the code cells, on the Linux machine/server, we need to add the Chinese font by adding the font /home/humphrey/anaconda3/envs/quantecon/lib/python3.1/site-packages/matplotlib/mpl-data/fonts/ttf ) I managed to make it work on my Linux server : ) (see more at https://stackoverflow.com/questions/40290004/how-can-i-configure-matplotlib-to-be-able-to-read-fonts-from-a-local-path) |
thanks @HumphreyYang I have seen this also -- perhaps we can use system wide fonts and passing a fonts property to the legend? https://stackoverflow.com/questions/39630928/how-to-plot-a-figure-with-chinese-characters-in-label |
Hi @mmcky, I tried this too, but I still need to add the ttf file into the mpl folder to make it work : ( |
This issue is solved by adding
to imports at the beginning of the lecture. See #35. |
Great -- that's what I thought. Cheers. |
Hi @mmcky, I found some PRs have not yet been updated to this solution. Maybe we should keep an eye on this? |
Currently the matplotlib figures are not displaying Chinese characters correctly
@longye-tian can you apply @HumphreyYang fix to the top code block to see if it fixes this issue #5
The text was updated successfully, but these errors were encountered: