{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/ipywidgets/issues/1179","repository_url":"https://api.github.com/repos/ipython/ipywidgets","labels_url":"https://api.github.com/repos/ipython/ipywidgets/issues/1179/labels{/name}","comments_url":"https://api.github.com/repos/ipython/ipywidgets/issues/1179/comments","events_url":"https://api.github.com/repos/ipython/ipywidgets/issues/1179/events","html_url":"https://github.com/ipython/ipywidgets/issues/1179","id":211461790,"number":1179,"title":"interact + plotting with ipywidgets 6.0.0 produces many graphs or none","user":{"login":"mglerner","id":3926211,"avatar_url":"https://avatars2.githubusercontent.com/u/3926211?v=3","gravatar_id":"","url":"https://api.github.com/users/mglerner","html_url":"https://github.com/mglerner","followers_url":"https://api.github.com/users/mglerner/followers","following_url":"https://api.github.com/users/mglerner/following{/other_user}","gists_url":"https://api.github.com/users/mglerner/gists{/gist_id}","starred_url":"https://api.github.com/users/mglerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mglerner/subscriptions","organizations_url":"https://api.github.com/users/mglerner/orgs","repos_url":"https://api.github.com/users/mglerner/repos","events_url":"https://api.github.com/users/mglerner/events{/privacy}","received_events_url":"https://api.github.com/users/mglerner/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2017-03-02T17:28:52Z","updated_at":"2017-03-02T18:36:58Z","closed_at":null,"body":"The following code worked for me in the previous version of ipywidgets (5.whatever-was-most-recent). By \"worked\" I mean it produced one plot, and dragging the slider updated that plot, with only one line shown on the plot at a time. If relevant, I'm using Chrome on OS X.\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\n%matplotlib inline\r\nfrom ipywidgets import interact\r\n\r\ndef f(n):\r\n    plt.plot([0,1,2],[0,1,n])\r\ninteract(f,n=(0,10))\r\n```\r\n\r\nI just updated to 6.0.0, cleared my browser cache, and relaunched everything. Now I get a new plot inserted vertically below the old one every time I drag the slider around.\r\n\r\nI tried\r\n\r\n```\r\nimport matplotlib.pyplot as plt\r\n%matplotlib inline\r\nfrom ipywidgets import interact\r\n\r\ndef f(n):\r\n    plt.plot([0,1,2],[0,1,n])\r\ninteract(f,n=(0,10))\r\n```\r\n\r\n\r\ninstead, and the plot does not update when the slider is dragged.\r\n\r\nChanging `%matplotlib inline` to `%matplotlib notebook` and adding `plt.clf()` before the plot line sometimes works, but also sometimes just produces a blank plot when I drag the slider around.\r\n\r\nHere's some system information; I'm happy to provide more:\r\n\r\n```╰─➤  python -c \"import IPython; print(IPython.sys_info())\"\r\n{'commit_hash': '5c9c918',\r\n 'commit_source': 'installation',\r\n 'default_encoding': 'UTF-8',\r\n 'ipython_path': '/Users/mglerner/anaconda3/envs/nodev_up/lib/python3.6/site-packages/IPython',\r\n 'ipython_version': '5.1.0',\r\n 'os_name': 'posix',\r\n 'platform': 'Darwin-15.6.0-x86_64-i386-64bit',\r\n 'sys_executable': '/Users/mglerner/anaconda3/envs/nodev_up/bin/python',\r\n 'sys_platform': 'darwin',\r\n 'sys_version': '3.6.0 |Anaconda custom (x86_64)| (default, Dec 23 2016, '\r\n                '13:19:00) \\n'\r\n                '[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]'}\r\n```\r\n\r\n`In [2]: matplotlib.__version__\r\nOut[2]: '2.0.0'\r\n`\r\n\r\n\r\nI then tried updating a few things to the conda-forge version, including matplotlib. The results of the update are below, but the update did not fix the behavior.\r\n\r\n`╰─➤  conda update ipython matplotlib jupyter numpy -c conda-forge                                                                                                                   1 ↵\r\nFetching package metadata ...............\r\nSolving package specifications: .\r\n\r\nPackage plan for installation in environment /Users/mglerner/anaconda3/envs/nodev_up:\r\n\r\nThe following NEW packages will be INSTALLED:\r\n\r\n    blas:         1.1-openblas       conda-forge\r\n    libgfortran:  3.0.0-0            conda-forge\r\n    olefile:      0.44-py36_0        conda-forge\r\n    openblas:     0.2.19-1           conda-forge\r\n\r\nThe following packages will be UPDATED:\r\n\r\n    freetype:     2.5.5-2                        --> 2.7-1                              conda-forge\r\n    ipython:      5.1.0-py36_1                   --> 5.3.0-py36_0                       conda-forge\r\n    libpng:       1.6.27-0                       --> 1.6.28-0                           conda-forge\r\n    matplotlib:   2.0.0-np111py36_0              --> 2.0.0-np111py36_2                  conda-forge\r\n    numpy:        1.11.3-py36_0                  --> 1.11.3-py36_blas_openblas_200      conda-forge [blas_openblas]\r\n    pillow:       4.0.0-py36_0                   --> 4.0.0-py36_2                       conda-forge\r\n    scipy:        0.18.1-np111py36_1             --> 0.18.1-np111py36_blas_openblas_201 conda-forge [blas_openblas]\r\n\r\nThe following packages will be SUPERCEDED by a higher-priority channel:\r\n\r\n    jupyter:      1.0.0-py36_3                   --> 1.0.0-py36_0                       conda-forge\r\n    scikit-learn: 0.18.1-np111py36_1             --> 0.18-np111py36_blas_openblas_203   conda-forge [blas_openblas]\r\n\r\nProceed ([y]/n)? \r\n`\r\n\r\nAfter doing so, the behavior was unchanged."},"comment":{"url":"https://api.github.com/repos/ipython/ipywidgets/issues/comments/283739719","html_url":"https://github.com/ipython/ipywidgets/issues/1179#issuecomment-283739719","issue_url":"https://api.github.com/repos/ipython/ipywidgets/issues/1179","id":283739719,"user":{"login":"dmadeka","id":7892382,"avatar_url":"https://avatars1.githubusercontent.com/u/7892382?v=3","gravatar_id":"","url":"https://api.github.com/users/dmadeka","html_url":"https://github.com/dmadeka","followers_url":"https://api.github.com/users/dmadeka/followers","following_url":"https://api.github.com/users/dmadeka/following{/other_user}","gists_url":"https://api.github.com/users/dmadeka/gists{/gist_id}","starred_url":"https://api.github.com/users/dmadeka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmadeka/subscriptions","organizations_url":"https://api.github.com/users/dmadeka/orgs","repos_url":"https://api.github.com/users/dmadeka/repos","events_url":"https://api.github.com/users/dmadeka/events{/privacy}","received_events_url":"https://api.github.com/users/dmadeka/received_events","type":"User","site_admin":false},"created_at":"2017-03-02T18:36:58Z","updated_at":"2017-03-02T18:36:58Z","body":"Or @mglerner you can use bqplot, which is built exactly for this. Try the pyplot API, it seems to be what you want"}}
{"actor":{"display_login":"dmadeka"}}