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

regression: builtin latex rendering doesn't find the right mathematical fonts #6665

Closed
boffi opened this issue Jun 28, 2016 · 7 comments
Closed
Labels
status: duplicate status: needs clarification Issues that need more information to resolve.

Comments

@boffi
Copy link

boffi commented Jun 28, 2016

Matplotlib 1.5.1, installed by conda
Python 3.5.1 |Continuum Analytics, Inc.| (default, Jun 15 2016, 15:32:45)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux

I have this regression, starting from today the matplotlib builtin latex rendering doesn't find the right mathematical fonts.
I have to say that (earlier) today a conda update --all had installed a new version of fontconfig and on the whole it smells of a packaging problem... anyway...

My code

>>> import matplotlib.pyplot as plt
>>> plt.xlabel('$x_1$')
<matplotlib.text.Text object at 0x7fcc8c846c50>
>>> plt.plot(range(3))
[<matplotlib.lines.Line2D object at 0x7fcc7bd69198>]
>>> plt.show()

my output, please look at the index of x
figure_1

@boffi
Copy link
Author

boffi commented Jun 28, 2016

There is something strange with the font cache,

boffi@debian:~$ find | grep fontList.cache
boffi@debian:~$ python
Python 3.5.1 |Continuum Analytics, Inc.| (default, Jun 15 2016, 15:32:45) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from matplotlib.font_manager import FontManager
>>> FontManager()
/home/boffi/src/miniconda3/lib/python3.5/site-packages/matplotlib/font_manager.py:274: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
/home/boffi/src/miniconda3/lib/python3.5/site-packages/matplotlib/font_manager.py:274: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
<matplotlib.font_manager.FontManager object at 0x7f22e57b8a58>
>>> 
boffi@debian:~$ find | grep fontList.cache
boffi@debian:~$ 
  1. at the beginning, I have no fontList.cache (it used to be in ~/.cache/matplotlib/fontList.cache`)
  2. the font manager tells me (twice, once for TTF and once for AFM, isn't it?) that it's building the font cache and doesn't signal any error
  3. at the end, I still cannot see any fontList.cache file...

@QuLogic
Copy link
Member

QuLogic commented Jun 28, 2016

It is fontList.py3k.cache for Python 3.

@tacaswell tacaswell added this to the 2.0 (style change major release) milestone Jun 29, 2016
@tacaswell tacaswell added the status: needs clarification Issues that need more information to resolve. label Jun 29, 2016
@tacaswell
Copy link
Member

What is in your rcparams?

I can not reproduce this in a fresh environment (conda create -n mpl151 python=3.5 matplotlib)

so

(and yes I know 'works for me' is the worst developer response ever)

@boffi
Copy link
Author

boffi commented Jun 29, 2016

The fontList cache file is in its place, as suggested by QuLogic, under its new name.
Tacaswell asks for my rcParams, here it is
rcParams.txt
and shows that in a new environment the subscript is rendered using the correct font,
so I too installed a new environment and yet I have not the correct font.

Is it possible that the new environment is built using the cached components of the installation?.. My problems started following a conda update --all.

PS: as far as I can recollect, the only change in rcParams I made concerns placing Ms Comic atop of the fantasy fonts' list.

@boffi
Copy link
Author

boffi commented Jun 29, 2016

Update

  1. I created a new user on my system, had they install a fresh miniconda3 environment, install matplotlib in it, run my example and everything latex rendering showed up fine... So it's me after all...
  2. I removed and reinstalled miniconda3, installed matplotlib and ran my example — the font cache was not remade, because I let in place all the configuration stuff in hidden files and directories — and voilà the subscript is correct...

I'm sorry that, as I've just realized, I've destroyed the possibility of replying and eventually fixing my particular regression.

@tacaswell
Copy link
Member

This may be related to #6617

@tacaswell tacaswell modified the milestones: 2.0.1 (next bug fix release), 2.0 (style change major release) Jun 30, 2016
@tacaswell
Copy link
Member

Closing in favor of #6976 which has much more detail and reproduction instructions.

@QuLogic QuLogic modified the milestones: unassigned, 2.0.1 (next bug fix release) Dec 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate status: needs clarification Issues that need more information to resolve.
Projects
None yet
Development

No branches or pull requests

3 participants