{"action":"created","issue":{"url":"https://api.github.com/repos/jakevdp/mpld3/issues/283","labels_url":"https://api.github.com/repos/jakevdp/mpld3/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/jakevdp/mpld3/issues/283/comments","events_url":"https://api.github.com/repos/jakevdp/mpld3/issues/283/events","html_url":"https://github.com/jakevdp/mpld3/issues/283","id":59350292,"number":283,"title":"how to dynamically update a plot in a loop in ipython notebook (within one cell)","user":{"login":"EderSantana","id":3902480,"avatar_url":"https://avatars.githubusercontent.com/u/3902480?v=3","gravatar_id":"","url":"https://api.github.com/users/EderSantana","html_url":"https://github.com/EderSantana","followers_url":"https://api.github.com/users/EderSantana/followers","following_url":"https://api.github.com/users/EderSantana/following{/other_user}","gists_url":"https://api.github.com/users/EderSantana/gists{/gist_id}","starred_url":"https://api.github.com/users/EderSantana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EderSantana/subscriptions","organizations_url":"https://api.github.com/users/EderSantana/orgs","repos_url":"https://api.github.com/users/EderSantana/repos","events_url":"https://api.github.com/users/EderSantana/events{/privacy}","received_events_url":"https://api.github.com/users/EderSantana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-28T17:43:38Z","updated_at":"2015-02-28T20:57:10Z","closed_at":null,"body":"Hi, I'm trying update lines of my mlpd3 plot but its not working.\r\nI am trying something like the following code using IPython notebook:\r\n```python\r\n%matplotlib inline\r\nimport mpld3\r\nimport matplotlib.pyplot as plt\r\nfrom numpy.random import randn\r\nfig, ax = plt.subplots()\r\nlines = ax.plot(randn(100))\r\nmpld3.display(fig)\r\nfor i in range(10):\r\n    lines[0].set_ydata(randn(100))\r\n    fig.canvas.draw()\r\n    mpld3.display(fig)\r\n```\r\nBut nothing is plotted at all. How do I force mlpd3 to redraw the lines? (I want to keep everything else fixed to avoid flickering effects).\r\n\r\nPS: I am aware of the StackOverflow solution for the same question, using matplotlib, but the solution redraws the whole png all the time and has the flickers I'm talking about."},"comment":{"url":"https://api.github.com/repos/jakevdp/mpld3/issues/comments/76545628","html_url":"https://github.com/jakevdp/mpld3/issues/283#issuecomment-76545628","issue_url":"https://api.github.com/repos/jakevdp/mpld3/issues/283","id":76545628,"user":{"login":"philippjfr","id":1550771,"avatar_url":"https://avatars.githubusercontent.com/u/1550771?v=3","gravatar_id":"","url":"https://api.github.com/users/philippjfr","html_url":"https://github.com/philippjfr","followers_url":"https://api.github.com/users/philippjfr/followers","following_url":"https://api.github.com/users/philippjfr/following{/other_user}","gists_url":"https://api.github.com/users/philippjfr/gists{/gist_id}","starred_url":"https://api.github.com/users/philippjfr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/philippjfr/subscriptions","organizations_url":"https://api.github.com/users/philippjfr/orgs","repos_url":"https://api.github.com/users/philippjfr/repos","events_url":"https://api.github.com/users/philippjfr/events{/privacy}","received_events_url":"https://api.github.com/users/philippjfr/received_events","type":"User","site_admin":false},"created_at":"2015-02-28T20:57:10Z","updated_at":"2015-02-28T20:57:10Z","body":"Related to #262. This would require considerable effort to do properly, but it would be totally worth it. Would love to hear if anyone can suggest any good solutions."}}