-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Replace \pgfimage by \includegraphics in PGF backend #10963
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
attn @pwuertz |
I do remember trying \includegraphics first and having troubles with it, but I don't remember any specifics. It may very well be that those problems are gone now and switching to includegraphics is fine, but we'd have to check the tests on all supported TeX systems to be sure there are no drawbacks. On the other hand, is there a need to change it at all? I don't know what subimport does, but as written in the preamble comment, the current pgf figures should work perfectly fine with
|
Nonetheless, neither I'd be happy to help with testing. |
I'm still puzzled as to why I did some tests in replacing |
https://tex.stackexchange.com/a/32989 states that |
Repeated a interpolation and clipping test successfully with pdf-, xe- and lualatex. If there was a problem with |
I was running tests on my machine using TeX Live 2017. The Travis CI tests, which are running with TeX Live 2013, are failing due to the interpolation parameter in |
By the way, Travis uses Ubuntu 14.04 by default, which comes with texlive 2013. If Travis decided to go to the next LTS, 16.04, we could check if texlive 2015 does the job. They seem to be a bit conservative though, 14.04 was declared default in late 2017... |
As far as I know, matplotlib 3.0 will require at least Python 3.5. Ubuntu 14.04 has 3.4, so it will not be compatible with mpl 3.0 anyways. Therefore I guess it should be safe to get this fix into mpl 3.0, as not many people will be running Texlive 2013 with Python 3.5+. Another option would be to add something to Btw, I am using Ubuntu 16.04 with Texlive 2015, and |
I also think that 16.04 is a reasonable base to support, but Travis could become a problem here. It sounds like they are not planning on updating Ubuntu base images any time soon. They instead advise on using docker for building custom testing environments. |
fwiw http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/required/graphics/grfguide.pdf states that interpolate support only dates back to 2017/06/01. |
I wonder whether a solution like #11228 (conditional tex code) could be adopted. |
@anntzer Good idea. Probably a naive question, but: Do TeX packages like Also, there seems to be mixed information concerning interpolation support. The link you posted says that this feature is from 2017, whereas Texlive 2015 already managed to compile a figure using interpolate.. |
Apparently yes: https://tex.stackexchange.com/a/13309/4101 |
Nice catch. In Ubuntu 18.04 |
It says \ProvidesPackage{graphicx}
[2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR)] Grepping for "interpolate" in my latex tree found a match in % 2010/09/09 v0.05a (HO)
% [...]
% * Option `interpolate' added for bitmaps, see PDF specification.
% Values are `true' or `false', default is `false'. So I guess |
If anybody stumbles across this and is looking for a workaround, putting |
For another work around: If you are programmatically generating the pgf (via a script or scons or some other way) is to add something like
to the end of the script. |
Had the same issue today. Neither import nor subimport would fix the problem. The hacky and simple solution above fixed it though. |
The PGF backend uses
\pgfimage
matplotlib/lib/matplotlib/backends/backend_pgf.py
Line 693 in 7ae9062
to include raster images (e.g. drawn by
imshow
). This does not work with\subimport
in Latex, whereas\includegraphics
does.According to https://tex.stackexchange.com/questions/32986/,
\includegraphics
is to be prefered anyways, and its only drawback (the missinginterpolate
option) has been resolved in 2010.If desired, I can create a pull request.
The text was updated successfully, but these errors were encountered: