{"action":"created","issue":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/1394","repository_url":"https://api.github.com/repos/jorgenschaefer/elpy","labels_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/1394/labels{/name}","comments_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/1394/comments","events_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/1394/events","html_url":"https://github.com/jorgenschaefer/elpy/issues/1394","id":330925660,"node_id":"MDU6SXNzdWUzMzA5MjU2NjA=","number":1394,"title":"matplotlib plot not appearing with elpy 1.21.0","user":{"login":"markseeto","id":39866968,"node_id":"MDQ6VXNlcjM5ODY2OTY4","avatar_url":"https://avatars3.githubusercontent.com/u/39866968?v=4","gravatar_id":"","url":"https://api.github.com/users/markseeto","html_url":"https://github.com/markseeto","followers_url":"https://api.github.com/users/markseeto/followers","following_url":"https://api.github.com/users/markseeto/following{/other_user}","gists_url":"https://api.github.com/users/markseeto/gists{/gist_id}","starred_url":"https://api.github.com/users/markseeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markseeto/subscriptions","organizations_url":"https://api.github.com/users/markseeto/orgs","repos_url":"https://api.github.com/users/markseeto/repos","events_url":"https://api.github.com/users/markseeto/events{/privacy}","received_events_url":"https://api.github.com/users/markseeto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-06-09T23:08:33Z","updated_at":"2018-06-10T11:14:07Z","closed_at":"2018-06-10T10:16:30Z","author_association":"NONE","body":"# Summary\r\n\r\nAfter upgrading elpy from version 1.17.0 to 1.21.0, matplotlib plots are not appearing. I did not have this problem with elpy 1.17.0. I did not upgrade or install any other packages. \r\n\r\n# Steps to reproduce\r\nI start Python with `M-x run-python`.\r\n\r\n```\r\nIn [1]: import matplotlib.pyplot as plt\r\n\r\nIn [2]: plt.plot([1,2,3,4])\r\nOut[2]: [<matplotlib.lines.Line2D at 0xe718ec17b8>]\r\n<Figure size 432x288 with 1 Axes>\r\n\r\nIn [3]: plt.show()\r\n```\r\nand no plot appears. If I remember correctly, in elpy 1.17.0 the plot appeared without needing to call `plt.show()` (I'm new to elpy and Python so I don't know if this was the expected behaviour).\r\n\r\n\r\n# My configuration\r\n## OS\r\nGNU Emacs 25.2 on Windows 8.1.\r\n\r\n## Result of `(elpy-config)`\r\n```\r\nVirtualenv........: None\r\nRPC Python........: 3.6.3 (c:/Windows/py.exe)\r\nInteractive Python: jupyter (c:/Program Files/Python36/Scripts/jupyter.exe)\r\nEmacs.............: 25.2.1\r\nElpy..............: 1.21.0\r\nJedi..............: 0.12.0\r\nRope..............: 0.10.7\r\nAutopep8..........: Not found (1.3.5 available)\r\nYapf..............: Not found (0.22.0 available)\r\nSyntax checker....: Not found (flake8)\r\n\r\nYou have not activated a virtual env. While Elpy supports this, it is often a\r\ngood idea to work inside a virtual env. You can use M-x pyvenv-activate or M-x\r\npyvenv-workon to activate a virtual env.\r\n\r\nThe autopep8 package is not available. Commands using this will not work.\r\n\r\n[run] c:/Windows/py.exe -m pip install --user autopep8\r\n\r\nThe yapf package is not available. Commands using this will not work.\r\n\r\n[run] c:/Windows/py.exe -m pip install --user yapf\r\n\r\nThe configured syntax checker could not be found. Elpy uses this program to\r\nprovide syntax checks of your programs, so you might want to install one. Elpy\r\nby default uses flake8.\r\n\r\n[run] c:/Windows/py.exe -m pip install --user flake8\r\n```\r\n\r\n## Elpy configuration in my init.el\r\n```\r\n(elpy-enable)\r\n\r\n(setq python-shell-interpreter \"jupyter\"\r\n      python-shell-interpreter-args \"console --simple-prompt\"\r\n      python-shell-prompt-detect-failure-warning nil)\r\n(add-to-list 'python-shell-completion-native-disabled-interpreters\r\n             \"jupyter\")\r\n\r\n;; Avoid changing M-a and M-e in python mode\r\n(define-key python-mode-map [remap backward-sentence] nil)\r\n(define-key python-mode-map [remap forward-sentence] nil)\r\n\r\n```\r\nThank you.\r\n"},"comment":{"url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/comments/396040706","html_url":"https://github.com/jorgenschaefer/elpy/issues/1394#issuecomment-396040706","issue_url":"https://api.github.com/repos/jorgenschaefer/elpy/issues/1394","id":396040706,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NjA0MDcwNg==","user":{"login":"markseeto","id":39866968,"node_id":"MDQ6VXNlcjM5ODY2OTY4","avatar_url":"https://avatars3.githubusercontent.com/u/39866968?v=4","gravatar_id":"","url":"https://api.github.com/users/markseeto","html_url":"https://github.com/markseeto","followers_url":"https://api.github.com/users/markseeto/followers","following_url":"https://api.github.com/users/markseeto/following{/other_user}","gists_url":"https://api.github.com/users/markseeto/gists{/gist_id}","starred_url":"https://api.github.com/users/markseeto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markseeto/subscriptions","organizations_url":"https://api.github.com/users/markseeto/orgs","repos_url":"https://api.github.com/users/markseeto/repos","events_url":"https://api.github.com/users/markseeto/events{/privacy}","received_events_url":"https://api.github.com/users/markseeto/received_events","type":"User","site_admin":false},"created_at":"2018-06-10T11:14:06Z","updated_at":"2018-06-10T11:14:06Z","author_association":"NONE","body":"Thank you for your comments galaunay. After `import matplotlib.pyplot as plt`, I tried `plt.ion()` and it didn't have the same effect as `% matplotlib`. That is, if I run `plt.ion()` but not `% matplotlib`, then plots do not appear at all, even after `plt.show()`. But after running `% matplotlib`, you were right that `plt.ioff()` prevents plots from appearing until `plt.show()` is called. And if I run `% matplotlib` then `plt.ioff()` then `plt.ion()`, it goes back to displaying plots without calling `plt.show()`. This is useful to know. Thanks."}}
{"actor":{"display_login":"markseeto"}}