-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
usetex problem in Matplotlib 2.0 #8259
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
I can not reproduce this with a clean installation
|
Doing a simple plot inside Jupyter notebook.
The same error is returned:
Running the same example inside an ipython terminal, the same occurs. |
No problem if save as |
Can you try removing all of the files in |
I removed the matplotlib cache before and tried again, without success. As aditional information, this problem only occurs when save plots as |
Problem fixed generating a local map of fonts using |
How did you install texlive? Arch package or repo? |
Installed from default Arch package with Now I think the question is: why do Matplolib 1.5.3 runs normally without this local map and 2.0 doesn't? |
I'm getting the same error even after generating a local font map with the |
Having the same issue with non-Type 1 fonts... |
I am on latest version of Manjaro KDE, using Spyder 3.1.3 with Python 3.6. I get the same error about 'cmr10'. As @juliotux observed, |
Hello, Another Arch user here with the same problem. I've also solved it by running Finally I was able to solve it by running |
The code runs |
Also, can someone point me to a Vagrantfile or another way to install an Arch Linux distribution in a virtual machine, with the Matplotlib prerequisites and enough of texlive installed to see this bug? |
Honestly I don't think this should be considered a bug in matplotlib (and
thus should probably be closed).
The problem is that Arch (and apparently some other Linux distros) are not
generating updmap.map after texlive is installed, at least not correctly.
In my case that was because `/etc/texmf` is not in TEXMF (actually it is
but with !! in front of it), so updmap wasn't able to read updmap.cfg and
thus was generating a file that didn't contain all fonts.
…On Sat, May 13, 2017 at 6:19 PM, Jouni K. Seppänen ***@***.*** > wrote:
Also, can someone point me to a Vagrantfile or another way to install an
Arch Linux distribution in a virtual machine, with the Matplotlib
prerequisites and enough of texlive installed to see this bug?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8259 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABusIAQHkk5Fgm_PUI8sTkQ0eLjwAJSBks5r5dgVgaJpZM4MZklZ>
.
|
Another interesting infos that can be related to this problem in Arch. Before install Matplotlib, I didn't have any problem to compile generic .tex files (with texlive-most already installed). But, for some reason, after the install, all the tex compiling stopped to work until run the I don't know too much about other distros, but Arch uses two font maps, one owned by system and generated by |
attn @felixonmars any insight from the arch side? |
Sorry but I am not familiar with TeX at all :( |
Reproduction instructions: I used Linode's "Arch 2017.07.1" and ran
and accepted all defaults. Then I started import matplotlib
matplotlib.use('pdf')
matplotlib.rcParams.update({'font.size': 14})
import matplotlib.pyplot as plt
plt.rc('text', usetex=True)
fig, ax = plt.subplots(1, 1, figsize=(8, 8))
ax.plot([0,1,2,3,4], [4,3,2,1,0])
fig.savefig('dummy.pdf') I got a similar error as reported above. |
The command |
Thanks for the info!
…On 3 August 2017 at 18:11, Jouni K. Seppänen ***@***.***> wrote:
The command updmap --cnffile /etc/texmf/web2c/updmap.cfg -sys fixes the map
files so that the cmr12 font is found, and the script works. Before that
command none of the map files I could find included that font.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
--
Carlos Miguel Ferreira
Researcher at Telecommunications Institute
Aveiro - Portugal
Work E-mail - cmf@av.it.pt
Skype & GTalk -> carlosmf.pt@gmail.com
LinkedIn -> http://www.linkedin.com/in/carlosmferreira
|
Yes, that was the case for me as well. But you see that the problem is that
you shouldn't have to specify the config file in the first place, when you
run `updmap` this dir should be considered by default.
However, when you look at the TEXMF envvar (which gives the default path),
it has this dir with a !! in front of it for some reason... If the dir is
added (i.e. the !! is removed), you can just run updmap normally and it
will work, so the post-install hooks would generate the map files correctly.
Fixing this would take correctly defining TEXMF in Arch and other affected
distros. I looked into this briefly at the time and wasn't able to find
where it is defined though...
Le jeu. 3 août 2017 à 19:11, Jouni K. Seppänen <notifications@github.com> a
écrit :
… The command updmap --cnffile /etc/texmf/web2c/updmap.cfg -sys fixes the
map files so that the cmr12 font is found, and the script works. Before
that command none of the map files I could find included that font.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8259 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABusIOH0c1l6KuoDFUjWYLAYcz-dSTRoks5sUf87gaJpZM4MZklZ>
.
|
I think I agree with the comment saying that this is an Arch Linux configuration issue rather than a Matplotlib bug. The error message could be clearer, though. Possibly related: the following commit deletes the upstream updmap configuration, commenting that it "contains too many maps". |
Agree about the error message, it was hard to track it. Maybe what could be
done on matplotlib's end is to throw a warning when the font is not found
in TeX Live -- there's an if-else block at some point that checks for that,
and then goes on looking for the font in other dirs, including the current
one (that's where the error message comes from).
Otherwise, we should probably contact Arch core packages maintaners about
the issue -- in particular Remy (remy at archlinux org) who has been doing
these commits.
Le jeu. 3 août 2017 à 19:29, Jouni K. Seppänen <notifications@github.com> a
écrit :
… I think I agree with the comment saying that this is an Arch Linux
configuration issue rather than a Matplotlib bug. The error message could
be clearer, though.
Possibly related: the following commit deletes the upstream updmap
configuration, commenting that it "contains too many maps".
https://git.archlinux.org/svntogit/packages.git/commit/trunk/PKGBUILD?h=packages/texlive-core&id=7eaea8d4f608f13bb5afc4394ed6f4624ded1fd4
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8259 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABusII9HgZHiY-y5RmxyTAv80NttPKYWks5sUgOPgaJpZM4MZklZ>
.
|
Adds some info: I was getting a (maybe) similar problem with pypandoc's test suite: JessicaTegner/pypandoc#132 |
The pypandoc issue looks very similar in that an installed font is
missing from the pdftex.map file. The same workaround to regenerate the
map file would probably help.
|
You just need to make sure all your text follows LaTex conventions. |
FWIW I cannot reproduce this anymore using a clean Arch Linux docker image and @jkseppan's instructions. I'll optimistically assume that this has been fixed in the meantime either on Arch's side or on Matplotlib's side, but feel free to reopen with a more recent repro. |
Recently, after the matplotlib 1->2 update, some plots that worked in 1.5.3 stoped working in this new version. All of them use tex rendering for texts and math. Latex is correctly installed and the package is installed inside Anaconda 4.2.0.
If I set only
The following errors are raised:
But, if I change the fonts to palatino, this plot is processed OK, but another plot in the same document raises similar error, but with "cmsy10" fonts.
The text was updated successfully, but these errors were encountered: