Title: matplotlib.use('nbagg ') does not work in Python 3 · Issue #3436 · matplotlib/matplotlib · GitHub
Open Graph Title: matplotlib.use('nbagg ') does not work in Python 3 · Issue #3436 · matplotlib/matplotlib
X Title: matplotlib.use('nbagg ') does not work in Python 3 · Issue #3436 · matplotlib/matplotlib
Description: This snippet: import matplotlib matplotlib.use('nbagg') from matplotlib import pyplot as plt Results in this traceback: --------------------------------------------------------------------------- NameError Traceback (most recent call las...
Open Graph Description: This snippet: import matplotlib matplotlib.use('nbagg') from matplotlib import pyplot as plt Results in this traceback: --------------------------------------------------------------------------- N...
X Description: This snippet: import matplotlib matplotlib.use('nbagg') from matplotlib import pyplot as plt Results in this traceback: ---------------------------------------------------------------------...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/3436
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"matplotlib.use('nbagg ') does not work in Python 3","articleBody":"This snippet:\n\n```\nimport matplotlib\nmatplotlib.use('nbagg')\nfrom matplotlib import pyplot as plt\n```\n\nResults in this traceback:\n\n```\n---------------------------------------------------------------------------\nNameError Traceback (most recent call last)\n\u003cipython-input-5-68fd53519d64> in \u003cmodule>()\n 1 import matplotlib\n 2 matplotlib.use('nbagg')\n----> 3 from matplotlib import pyplot as plt\n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\pyplot.py in \u003cmodule>()\n 106 \n 107 from matplotlib.backends import pylab_setup\n--> 108 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()\n 109 \n 110 \n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\backends\\__init__.py in pylab_setup()\n 30 # imports. 0 means only perform absolute imports.\n 31 backend_mod = __import__(backend_name,\n---> 32 globals(),locals(),[backend_name],0)\n 33 \n 34 # Things we pull in from all backends\n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\backends\\backend_nbagg.py in \u003cmodule>()\n 10 \n 11 from matplotlib.figure import Figure\n---> 12 from matplotlib.backends.backend_webagg_core import (FigureManagerWebAgg,\n 13 FigureCanvasWebAggCore,\n 14 NavigationToolbar2WebAgg)\n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\backends\\backend_webagg_core.py in \u003cmodule>()\n 239 \n 240 \n--> 241 class NavigationToolbar2WebAgg(backend_bases.NavigationToolbar2):\n 242 _jquery_icon_classes = {\n 243 'home': 'ui-icon ui-icon-home',\n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\backends\\backend_webagg_core.py in NavigationToolbar2WebAgg()\n 255 for text, tooltip_text, image_file, name_of_method\n 256 in (backend_bases.NavigationToolbar2.toolitems +\n--> 257 (('Download', 'Download plot', 'download', 'download'),))\n 258 if image_file in _jquery_icon_classes]\n 259 \n\nC:\\Miniconda\\envs\\py34\\lib\\site-packages\\matplotlib\\backends\\backend_webagg_core.py in \u003clistcomp>(.0)\n 256 in (backend_bases.NavigationToolbar2.toolitems +\n 257 (('Download', 'Download plot', 'download', 'download'),))\n--> 258 if image_file in _jquery_icon_classes]\n 259 \n 260 def _init_toolbar(self):\n\nNameError: name '_jquery_icon_classes' is not defined\n```\n\nAnd this, I believe, is why:\n\nhttp://stackoverflow.com/questions/13905741/accessing-class-variables-from-a-list-comprehension-in-the-class-definition\n\nThanks!\n","author":{"url":"https://github.com/stahlous","@type":"Person","name":"stahlous"},"datePublished":"2014-08-29T21:25:43Z","url":"https://github.com/matplotlib/matplotlib/issues/3436"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:5f0e24f3-5a63-c470-d45e-290a6d3123eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5AC:33B2B:4A7930:64D989:6B067C7D |
| html-safe-nonce | 1a831f6907f98197ea0e7f143962f1693e8699b0a8f8ad8b0b0a6aecab92889f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUFDOjMzQjJCOjRBNzkzMDo2NEQ5ODk6NkIwNjdDN0QiLCJ2aXNpdG9yX2lkIjoiMTg3MTQ4MDQwOTg4MDQyNzY0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3b55950be7a5ee0dcc68985d74059a2da21466fa569fbec0181a8393f20407fb |
| hovercard-subject-tag | issue:41540945 |
| 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/3436/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4559672bb1f94ea0c2e4c76ec15b0a2dfc9991751841996e50663c279288bcd1/matplotlib/matplotlib/issues/3436 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4559672bb1f94ea0c2e4c76ec15b0a2dfc9991751841996e50663c279288bcd1/matplotlib/matplotlib/issues/3436 |
| og:image:alt | This snippet: import matplotlib matplotlib.use('nbagg') from matplotlib import pyplot as plt Results in this traceback: --------------------------------------------------------------------------- N... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | stahlous |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a |
| 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 | 6d3909414814ff86ce7da4c51a0f4918a13fb41b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width