Title: Draggable legend results RuntimeError and AttributeError on Mac OS 10.8.1 · Issue #1266 · matplotlib/matplotlib · GitHub
Open Graph Title: Draggable legend results RuntimeError and AttributeError on Mac OS 10.8.1 · Issue #1266 · matplotlib/matplotlib
X Title: Draggable legend results RuntimeError and AttributeError on Mac OS 10.8.1 · Issue #1266 · matplotlib/matplotlib
Description: Environment: Python 2.7.3 Matplotlib 1.1.1 Max OS 10.8.1 Code: In [1]: import matplotlib.pyplot as plt In [2]: plt.bar([1, 2, 3], [2, 3, 2], label='label') Out[2]: [ Open Graph Description: Environment: Python 2.7.3 Matplotlib 1.1.1 Max OS 10.8.1 Code: In [1]: import matplotlib.pyplot as plt In [2]: plt.bar([1, 2, 3], [2, 3, 2], label='label') Out[2]: [ X Description: Environment: Python 2.7.3 Matplotlib 1.1.1 Max OS 10.8.1 Code: In [1]: import matplotlib.pyplot as plt In [2]: plt.bar([1, 2, 3], [2, 3, 2], label='label') Out[2]: [<matplotlib.patches.R...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/1266
X: @github
Domain: github.com
Links:
Viewport: width=device-width
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Draggable legend results RuntimeError and AttributeError on Mac OS 10.8.1","articleBody":"Environment:\n- Python 2.7.3\n- Matplotlib 1.1.1\n- Max OS 10.8.1\n\nCode:\n\n``` python:\nIn [1]: import matplotlib.pyplot as plt\n\nIn [2]: plt.bar([1, 2, 3], [2, 3, 2], label='label')\nOut[2]: \n[\u003cmatplotlib.patches.Rectangle at 0x1043415d0\u003e,\n \u003cmatplotlib.patches.Rectangle at 0x104341650\u003e,\n \u003cmatplotlib.patches.Rectangle at 0x104341ad0\u003e]\n\nIn [3]: l = plt.legend()\n\nIn [4]: l.draggable()\nOut[4]: \u003cmatplotlib.legend.DraggableLegend at 0x10434fbd0\u003e\n```\n\nOnce I drag the legend, the following errors occurred. The same code works fine in Windows XP.\n\n```\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/offsetbox.py\", line 376, in get_extent_offsets\n whd_list = [c.get_extent(renderer) for c in self.get_visible_children()]\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/offsetbox.py\", line 639, in get_extent\n \"lp\", self._text._fontproperties, ismath=False)\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/backends/backend_macosx.py\", line 161, in get_text_width_height_descent\n width, height, descent = self.gc.get_text_width_height_descent(unicode(s), family, size, weight, style)\nRuntimeError: CGContextRef is NULL\n```\n\n```\nTraceback (most recent call last):\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/backend_bases.py\", line 1588, in motion_notify_event\n self.callbacks.process(s, event)\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/cbook.py\", line 262, in process\n proxy(*args, **kwargs)\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/cbook.py\", line 188, in __call__\n return mtd(*args, **kwargs)\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/offsetbox.py\", line 1434, in on_motion\n self.update_offset(dx, dy)\n File \"/Users/sin/Library/Python/2.7/lib/python/site-packages/matplotlib/offsetbox.py\", line 1504, in update_offset\n loc_in_canvas = self.offsetbox_x + dx, self.offsetbox_y + dy\nAttributeError: 'DraggableLegend' object has no attribute 'offsetbox_x'\n```\n","author":{"url":"https://github.com/sinhrks","@type":"Person","name":"sinhrks"},"datePublished":"2012-09-17T15:19:46.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/1266/matplotlib/issues/1266"}
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:8bfc5bf1-4835-7a27-e79a-3281415efe43 current-catalog-service-hash 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 request-id 9042:1D60FB:A051E6:D66A24:6A53149C html-safe-nonce c9620aad576b96d097c41c1e97c3e0f3973e95d3cbeef469f8195178940ecd0e visitor-payload eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MDQyOjFENjBGQjpBMDUxRTY6RDY2QTI0OjZBNTMxNDlDIiwidmlzaXRvcl9pZCI6IjU0ODEzOTk2MzA3NTcyODU0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 visitor-hmac 23cb034756420ab10424b11bb3ce1a909fd310f688eb413da936ddcdc2f2cd24 hovercard-subject-tag issue:6922536 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/1266/issue_layout twitter:image https://opengraph.githubassets.com/9a70184d6287a3986333418e05928e08a484c7ff392be8b97e1474bbfca0dda3/matplotlib/matplotlib/issues/1266 twitter:card summary_large_image og:image https://opengraph.githubassets.com/9a70184d6287a3986333418e05928e08a484c7ff392be8b97e1474bbfca0dda3/matplotlib/matplotlib/issues/1266 og:image:alt Environment: Python 2.7.3 Matplotlib 1.1.1 Max OS 10.8.1 Code: In [1]: import matplotlib.pyplot as plt In [2]: plt.bar([1, 2, 3], [2, 3, 2], label='label') Out[2]: [ og:image:width 1200 og:image:height 600 og:site_name GitHub og:type object og:author:username sinhrks 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
URLs of crawlers that visited me.