Title: Pgf plots with pdflatex broken · Issue #18826 · matplotlib/matplotlib · GitHub
Open Graph Title: Pgf plots with pdflatex broken · Issue #18826 · matplotlib/matplotlib
X Title: Pgf plots with pdflatex broken · Issue #18826 · matplotlib/matplotlib
Description: Bug report Bug summary When I use a very minimal example with the PGF backend I get an LaTeX error. Code for reproduction import matplotlib.pyplot as plt import numpy as np plt.rcParams.update({"pgf.texsystem": "pdflatex"}) x = np.linspa...
Open Graph Description: Bug report Bug summary When I use a very minimal example with the PGF backend I get an LaTeX error. Code for reproduction import matplotlib.pyplot as plt import numpy as np plt.rcParams.update({"pg...
X Description: Bug report Bug summary When I use a very minimal example with the PGF backend I get an LaTeX error. Code for reproduction import matplotlib.pyplot as plt import numpy as np plt.rcParams.update({&qu...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18826
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Pgf plots with pdflatex broken","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nWhen I use a very minimal example with the PGF backend I get an LaTeX error.\r\n\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nimport numpy as np\r\nplt.rcParams.update({\"pgf.texsystem\": \"pdflatex\"})\r\nx = np.linspace(-0.5, 0.5, 200)\r\nfig, ax = plt.subplots()\r\nax.plot(x, x)\r\nplt.savefig('out.pgf')\r\n```\r\n\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\r\n```\r\nValueError: Error processing '−0.4'\r\nLaTeX Output:\r\n\r\n! Package inputenc Error: Unicode character − (U+2212)\r\n(inputenc) not set up for use with LaTeX.\r\n\r\nSee the inputenc package documentation for explanation.\r\nType H \u003creturn\u003e for immediate help.\r\n ...\r\n\r\n\u003c*\u003e ...ze{10.000000}{12.000000}\\selectfont −0.4}\r\n\r\n! ==\u003e Fatal error occurred, no output PDF file produced!\r\n\r\n```\r\n\r\n**Expected outcome**\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Linux 5.4.0-52-generic #57-Ubuntu SMP Thu Oct 15 10:57:00 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux\r\n * Matplotlib version: 3.3.2\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): GTK3Agg\r\n * Python version: Python 3.8.5\r\n * Other libraries: Numpy ('1.18.4')\r\n* `pdflatex --version`:\r\n\r\n```\r\npdfTeX 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian)\r\nkpathsea version 6.3.1\r\nCopyright 2019 Han The Thanh (pdfTeX) et al.\r\nThere is NO warranty. Redistribution of this software is\r\ncovered by the terms of both the pdfTeX copyright and\r\nthe Lesser GNU General Public License.\r\nFor more information about these matters, see the file\r\nnamed COPYING and the pdfTeX source.\r\nPrimary author of pdfTeX: Han The Thanh (pdfTeX) et al.\r\nCompiled with libpng 1.6.37; using libpng 1.6.37\r\nCompiled with zlib 1.2.11; using zlib 1.2.11\r\nCompiled with xpdf version 4.01\r\n```\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\n\r\n","author":{"url":"https://github.com/phiadaarr","@type":"Person","name":"phiadaarr"},"datePublished":"2020-10-27T17:26:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/18826/matplotlib/issues/18826"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:02f08120-0397-816e-4ae6-2d1991f114a6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 995E:3695F9:5E5E2A:895BBF:6A55F245 |
| html-safe-nonce | 7f421a938b2163a5b38712f508c68292174c319055162ec9121d8c2b7df1ada2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTVFOjM2OTVGOTo1RTVFMkE6ODk1QkJGOjZBNTVGMjQ1IiwidmlzaXRvcl9pZCI6IjQ5NzY5Mzc3NDQyMzQ1NzQ0MDUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1482002f7e37582e6d3ad65169679c2c200c93a56b0f8166316f4bdd3d89882e |
| hovercard-subject-tag | issue:730664067 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/18826/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d3d58f0999a58d0d012744bd77ed74e62b48b87b08697fadd74d4abfe3ba679b/matplotlib/matplotlib/issues/18826 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d3d58f0999a58d0d012744bd77ed74e62b48b87b08697fadd74d4abfe3ba679b/matplotlib/matplotlib/issues/18826 |
| og:image:alt | Bug report Bug summary When I use a very minimal example with the PGF backend I get an LaTeX error. Code for reproduction import matplotlib.pyplot as plt import numpy as np plt.rcParams.update({"pg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | phiadaarr |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3725c7f9b2a6e3a27ef57c5aed13428c0f65e045 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width