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
osx backend does not allow font changes #1038
Comments
@mdehoon: Any thoughts? |
Works fine for me... |
I have tried deleting .matplotlib/matplotlibrc, but to no avail. If I start ipython with --pylab=osx the font in charts is serif, if I start it with --pylab=tk I get sans serif fonts. What should I check in my system to find out what is forcing the font with osx backend? Thanks |
Can you try with plain Python instead of ipython? With plain Python, I don't observe either of the two issues. |
same behaviour on plain python. Is there anywhere else settings for matplotlib are defined? As I mentioned, I got rid of matplotlibrc... |
You could try and have a look at what is happening in the draw_text method in |
The prop variable which, if I understand things correctly, contains the parameters for the font, specifies "Bitstream Vera Sans" as the font throughout the execution, ie both before and after entering the backend_macosx piece.
|
I now see that font.sans-serif contais a list of fonts, a few of which are installed on my system, but they are all correctly sans-serif fonts, so no idea why it falls back to a serif dont. |
I just tried the following:
|
I am afraid your only option is to look at the draw_text method in src/_macosx.m to see what is happening. This method makes a call to setfont; probably something is going wrong there. |
I just reinstalled matplotlib from git and the problem disappeared. go figure... |
Then let's close this issue. Any objections, anybody? |
The default font for all text is always Times, and there is no way to change that. If I try, for example, pyplot.title('MyChart',fontname='Courier'), the title is written in Times. Works fine with other backends.
my matplotlib version is latest from git.
The text was updated successfully, but these errors were encountered: