-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Unicode invisible after image saved #6326
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
Comments
By the looks of your image. I think the issue is that the symbols that you are using are simply missing in the font used to save the figure. Empty boxes are the general missing symbol fallback. Given that you are on OSX you are probably using the Mac OSX backend to display the figure but the image is saved with the Agg backend. Unfortunatly the OSX backend uses a different font loading system so it likely picks a different font. I would suggest trying to select a different font and see if that changes anything |
The problem still exists. In the |
I've met some problems like this long time ago. Don't remember how I managed to get this work. But I think there's an issue similar to this, see #4492. pylab.yticks(list(range(len(words))), words, color="b", fontname='SimHei') About font, there are a few ways to set it:
I think one of those might work. |
Glad, it helped. Problem solved, but issue exists. Figure saving and showing are using different fonts. Right? |
By default, yes. Adding |
mpl version 1.3.1 is pretty old, and prior to the soon-to-be-released 2.0 the OS X backend had quite a few peculiarities. The new version is using Agg for rendering. Can you build and test the version in master or the 2.0 branch? Or try a 1.5.1 release? I would not be surprised if font selection was changed between 1.3.1 and 1.5.1. |
Hi, problem still exists with 1.5.1 :-) |
The issue of OSX vs Agg chosing differently will be fixed in the next release. Is there any other remaining issue or can this close |
Let's close this issue. Thanks. |
OSX 10.11.4, Python 2.7.10, Matplotlib 1.3.1


Unicode characters were displayed correctly in the figure. But after saving, they went disappeared.
I was making a nltk like dispersion plot for Unicode text.
The text was updated successfully, but these errors were encountered: