Title: PGF back-end fails on simple graph · Issue #1128 · matplotlib/matplotlib · GitHub
Open Graph Title: PGF back-end fails on simple graph · Issue #1128 · matplotlib/matplotlib
X Title: PGF back-end fails on simple graph · Issue #1128 · matplotlib/matplotlib
Description: I'm not sure if this is related to the other Unicode/codec issue, but I'm trying out the pgf backend and I'm seeing what appears to be an issue with Unicode/codecs using matplotlib git master and Python 2.7 (Ubuntu 12.04): jholewinski@ra...
Open Graph Description: I'm not sure if this is related to the other Unicode/codec issue, but I'm trying out the pgf backend and I'm seeing what appears to be an issue with Unicode/codecs using matplotlib git master and P...
X Description: I'm not sure if this is related to the other Unicode/codec issue, but I'm trying out the pgf backend and I'm seeing what appears to be an issue with Unicode/codecs using matplotlib git ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/1128
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PGF back-end fails on simple graph","articleBody":"I'm not sure if this is related to the other Unicode/codec issue, but I'm trying out the pgf backend and I'm seeing what appears to be an issue with Unicode/codecs using matplotlib git master and Python 2.7 (Ubuntu 12.04):\n\n```\njholewinski@rapture [tests]$ python t1.py \nTraceback (most recent call last):\n File \"t1.py\", line 14, in \u003cmodule\u003e\n fig.savefig('ti.pgf', bbox_inches='tight')\n File \"/home/jholewinski/projects/matplotlib/matplotlib-pgf/build/lib.linux-x86_64-2.7/matplotlib/figure.py\", line 1262, in savefig\n self.canvas.print_figure(*args, **kwargs)\n File \"/home/jholewinski/projects/matplotlib/matplotlib-pgf/build/lib.linux-x86_64-2.7/matplotlib/backend_bases.py\", line 2048, in print_figure\n **kwargs)\n File \"/home/jholewinski/projects/matplotlib/matplotlib-pgf/build/lib.linux-x86_64-2.7/matplotlib/backend_bases.py\", line 1848, in print_pgf\n return pgf.print_pgf(*args, **kwargs)\n File \"/home/jholewinski/projects/matplotlib/matplotlib-pgf/build/lib.linux-x86_64-2.7/matplotlib/backends/backend_pgf.py\", line 664, in print_pgf\n with codecs.open(filename, \"w\", encoding=\"utf-8\") as fh:\n File \"/usr/lib/python2.7/codecs.py\", line 881, in open\n file = __builtin__.open(filename, mode, buffering)\nTypeError: coercing to Unicode: need string or buffer, _io.BytesIO found\n```\n\nThe graph script is very basic:\n\n```\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\n\nsub = fig.add_subplot(1, 1, 1)\n\nsub.plot([1, 2, 3], [2, 3, 4], label='Foo', markersize=2, marker='x')\n\nsub.grid()\nsub.set_axisbelow(True)\nsub.legend(loc=2)\n\nfig.savefig('t1.pgf', bbox_inches='tight')\n```\n\nI just built the latest git master with \"python setup.py build\" and used it directly from the build/ directory. Interestingly, the tests included with matplotlib do seem to generate graphs.\n","author":{"url":"https://github.com/jholewinski","@type":"Person","name":"jholewinski"},"datePublished":"2012-08-21T18:41:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/1128/matplotlib/issues/1128"}
| 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:b47343e2-2fd3-d8fb-befb-7bb9da97f13a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DBB8:276C72:3062452:41F66A2:6A53E0E0 |
| html-safe-nonce | 6ebfc5ef4d834f116befe4d94265233ea46d6bd869a01d9a051dfe19b24ac0a3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQkI4OjI3NkM3MjozMDYyNDUyOjQxRjY2QTI6NkE1M0UwRTAiLCJ2aXNpdG9yX2lkIjoiMzAyODc2ODQ2MTY5NjUyNDUxMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fed45963d329d9713ee70bcaea374682fea784eba886ed2793fea20bdb463973 |
| hovercard-subject-tag | issue:6358923 |
| 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/1128/issue_layout |
| twitter:image | https://opengraph.githubassets.com/40fe6570d0a2a9a2fd36d2a60b37f8ce057dda12a8e6dae0f6a212c22af6d369/matplotlib/matplotlib/issues/1128 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/40fe6570d0a2a9a2fd36d2a60b37f8ce057dda12a8e6dae0f6a212c22af6d369/matplotlib/matplotlib/issues/1128 |
| og:image:alt | I'm not sure if this is related to the other Unicode/codec issue, but I'm trying out the pgf backend and I'm seeing what appears to be an issue with Unicode/codecs using matplotlib git master and P... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jholewinski |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width