-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Issue with Seaborn and log plots in Python3 #3849
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
From the traceback I guess it relates to the typesetting of exponents with mathtext which is somehow different with seaborn |
Try nuking your fontcache. My knee-jerk reaction is that this is related to the unicode bug that showed up on osx which lead to finding rcparams.update was not validating. If you have not regenerated your font cache sense then you may have a mix of encodings in there. Also, that is an impressive trace-back. |
Thanks, I think I tried that already but I will investigate further. Yest is is a crazily long traceback. It nearly killed the IPython Notebook when I first ran the code. |
attn @mwaskom Did anything with fonts change on master recently? |
My guess is that it is somehow related to #3671 thou that should be fixed. |
Nope, don't think I've touched any font stuff since 0.4 or so. |
The issue is very similar to the issue that #3671 fixes. The problem is that the string returned as typeface is not a valid unicode string for the Arial font that Seaborn uses. The issue in #3671 was with CharacterComplement which is a part of the PCLT table too. The only reason Seaborn is involved is because it changes the default font. The strange thing here is that according to the MS docs here http://www.microsoft.com/typography/otspec/pclt.htm typeFace should be an ASCII string so it should be safe to cast it directly to unicode. @mdboom do you have any idea if that could sometime not be the case? A simple fix would be to turn typeFace into a byte string but I am not sure it is right. BTW: I think this is a stock Apple or perhaps MS office font file. |
Not sure if this is a MPL or seaborn issue but just posting it here so that it doesn't get lost. I will investigate further later.
Running the following works as expected in python 2 and using python3 without seaborn on master (1.5.x )
However it doesn't work with python3 see:
https://gist.github.com/jenshnielsen/5292948d67038bb77bfb
The text was updated successfully, but these errors were encountered: