html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/pull/2729#issuecomment-867457793,https://api.github.com/repos/pydata/xarray/issues/2729,867457793,MDEyOklzc3VlQ29tbWVudDg2NzQ1Nzc5Mw==,14808389,2021-06-24T08:46:31Z,2021-06-24T08:46:31Z,MEMBER,"@TomNicholas, this has been unintentionally closed when renaming `main`. Feel free to reopen if you still plan to work on this in the future.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-656108033,https://api.github.com/repos/pydata/xarray/issues/2729,656108033,MDEyOklzc3VlQ29tbWVudDY1NjEwODAzMw==,35968931,2020-07-09T12:50:30Z,2020-07-09T12:50:30Z,MEMBER,"Hi @spencerahill , sorry for the slow reply. This functionality isn't integrated yet, but hvplot I think probably provides the better approach. You will also want to see what philipjfr came up with over on #3709 , which would allow an xarray-like syntax but with the power of holoviews. The one remaining question for me with the holoviews approach is how easy it is to save a .gif or a video file. It seems like it [might be possible already](http://holoviews.org/user_guide/Exporting_and_Archiving.html), but if you have a go then let me know how it goes! (This is something I very very much want to see working, but isn't my priority right now) ","{""total_count"": 2, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-639789368,https://api.github.com/repos/pydata/xarray/issues/2729,639789368,MDEyOklzc3VlQ29tbWVudDYzOTc4OTM2OA==,6200806,2020-06-05T20:28:24Z,2020-06-05T20:28:24Z,CONTRIBUTOR,Just came across this PR while trying for the first time to create an animation of xarray data. Looks like it got quite far along but then sputtered. Did it get superseded by hvplot?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-489293638,https://api.github.com/repos/pydata/xarray/issues/2729,489293638,MDEyOklzc3VlQ29tbWVudDQ4OTI5MzYzOA==,15331990,2019-05-04T04:46:34Z,2019-05-04T04:47:30Z,CONTRIBUTOR,"This looks awesome; it would be really nice to have built-in xarray animation support! >> I'm personally more excited about 2D animations and am happy to implement that once all the common infrastructure is in. Also wanted to point out while that's progressing along, hvplot supports 2D animations. https://hvplot.pyviz.org/ ``` import xarray as xr import hvplot.xarray import holoviews as hv hv.extension('matplotlib') ds = xr.tutorial.open_dataset('air_temperature').isel(time=slice(0, 15)) hmap = ds.hvplot('lon', 'lat', dynamic=False).opts(fig_size=300, clim=(230, 300)) hv.save(hmap, 'anim.html', fmt='scrubber') # --- from IPython.core.display import display, HTML display(HTML('anim.html')) ``` ![anim](https://user-images.githubusercontent.com/15331990/57174031-d84ac900-6dec-11e9-9703-3e55f0ceebf7.gif) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-489056485,https://api.github.com/repos/pydata/xarray/issues/2729,489056485,MDEyOklzc3VlQ29tbWVudDQ4OTA1NjQ4NQ==,35968931,2019-05-03T10:46:55Z,2019-05-03T10:46:55Z,MEMBER,"> There's a glitch with the legend in the first gif. Maybe the location needs to be pinned to something that is not 'best' Yeah, I'm not entirely sure why that happens yet, but I guess it means the legend position should be determined automatically for only the first frame, then fixed there for the other frames. > I recommend saving facetgrid support for future PRs. Agree. I think I might also leave animated step plot support for a future PR. > I'm personally more excited about 2D animations and am happy to implement that once all the common infrastructure is in. Help with that would be great! I also really want to get 2D animations working - I'm often trying to make animations like this: ![n_over_t_visc_3 7e0](https://user-images.githubusercontent.com/35968931/57131662-fe447f00-6d94-11e9-9882-bf6e31e7451d.gif) I anticipate that there might be some difficulties with cartopy integration for 2D animations, but I don't actually use cartopy in my work, so help with that would be especially appreciated. > Just pinging jbusecke, who recently announced https://github.com/jbusecke/xmovie. Yeah we've been talking about the relationship between this and xmovie in https://github.com/jbusecke/xmovie/issues/2. I think that movie output functionality can be tacked on later. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488782977,https://api.github.com/repos/pydata/xarray/issues/2729,488782977,MDEyOklzc3VlQ29tbWVudDQ4ODc4Mjk3Nw==,14314623,2019-05-02T18:34:55Z,2019-05-02T18:34:55Z,CONTRIBUTOR,"Also FYI I have a PR open that will enable [xmovie](https://github.com/jbusecke/xmovie/pull/3) to write movie files (by invoking ffmpeg 'under the hood'). Just wanted to mention it since this might come in handy as another export option for this feature later on.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488780624,https://api.github.com/repos/pydata/xarray/issues/2729,488780624,MDEyOklzc3VlQ29tbWVudDQ4ODc4MDYyNA==,14314623,2019-05-02T18:27:49Z,2019-05-02T18:27:49Z,CONTRIBUTOR,This looks amazing! Which problem are you referring to specifically @rabernat?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488734476,https://api.github.com/repos/pydata/xarray/issues/2729,488734476,MDEyOklzc3VlQ29tbWVudDQ4ODczNDQ3Ng==,1197350,2019-05-02T16:10:54Z,2019-05-02T16:10:54Z,MEMBER,"Just pinging @jbusecke, who recently announced https://github.com/jbusecke/xmovie. He might have some insights on this problem.","{""total_count"": 1, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488732192,https://api.github.com/repos/pydata/xarray/issues/2729,488732192,MDEyOklzc3VlQ29tbWVudDQ4ODczMjE5Mg==,2448579,2019-05-02T16:04:06Z,2019-05-02T16:04:06Z,MEMBER,"This is looking great; let me know when you're ready for another review. I recommend saving facetgrid support for future PRs. I'm personally more excited about 2D animations and am happy to implement that once all the common infrastructure is in. With that bias in mind, I think the way to proceed would be: (this PR) → 2D animations → facetgrid support","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488731239,https://api.github.com/repos/pydata/xarray/issues/2729,488731239,MDEyOklzc3VlQ29tbWVudDQ4ODczMTIzOQ==,2448579,2019-05-02T16:01:18Z,2019-05-02T16:01:18Z,MEMBER,There's a glitch with the legend in the first gif. Maybe the location needs to be pinned to something that is not 'best',"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-459092462,https://api.github.com/repos/pydata/xarray/issues/2729,459092462,MDEyOklzc3VlQ29tbWVudDQ1OTA5MjQ2Mg==,24736507,2019-01-30T20:15:59Z,2019-04-30T16:06:37Z,NONE,"Hello @TomNicholas! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: ##### Comment last updated at 2019-04-30 16:06:37 UTC","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-488005900,https://api.github.com/repos/pydata/xarray/issues/2729,488005900,MDEyOklzc3VlQ29tbWVudDQ4ODAwNTkwMA==,35968931,2019-04-30T15:47:40Z,2019-04-30T15:47:40Z,MEMBER,"I've done some more work on this, you can now: ### Plot multiple animated lines ```python dat2d = air.isel(lat=[10, 15, 20]) anim = dat2d.plot(animate='time', hue='lat') anim.save('line.gif', writer='imagemagick') plt.show() ``` ![lines](https://user-images.githubusercontent.com/35968931/56974606-16cf5200-6b67-11e9-9ca8-7ec5be03ea6f.gif) ### Add static lines to an animated plot ```python # draw animated line anim = dat1d.plot(animate='time', label='evolving') # draw static line # plot will be drawn on to current axes unless ax argument given dat1d.mean(dim='time').plot(color='g', label='average') plt.legend(loc='upper right') anim.save('average.gif', writer='imagemagick') plt.show() ``` ![average](https://user-images.githubusercontent.com/35968931/56974713-48e0b400-6b67-11e9-8cf6-38d0309a9ca1.gif) ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-459368801,https://api.github.com/repos/pydata/xarray/issues/2729,459368801,MDEyOklzc3VlQ29tbWVudDQ1OTM2ODgwMQ==,35968931,2019-01-31T14:42:28Z,2019-01-31T14:57:31Z,MEMBER,"> Re complexity: It;s probably worth extracting everything to a animate_line function in animate.py? I've had a go at that in the most recent commits. > I think this is a cool example, and lots of users will probably like it. Great - it's definitely something I personally want to do all the time. > A high-level question: why was animatplot chosen over matplotlib's animation module? Because animatplot already abstracts away the creation of the animation, so plotting an animation becomes almost a simple substitution `matplotlib.plot.line() -> animatplot.blocks.Line()`. Another advantage is that animatplot's block abstraction should make it easier to compose figures made of [multiple animated plots](https://github.com/t-makaro/animatplot#animatplot), another thing people often want to do but is is awful with `matplotlib.funcanimation` directly. (I haven't really looked at how animated facetgrids might work yet, but I suspect that being able to animate a large list of blocks would be helpful too.) The logic is explained slightly more in #2355, and also looking at [animatplot's docs](https://animatplot.readthedocs.io/en/stable/index.html) might help you see why I think it's a good idea. We don't have to use animatplot, but if we didn't I would be suggesting reimplementing something with a similar class structure in xarray as the best approach anyway. The disadvantages of using animatplot are that it's an extra (optional) dependency, and it's not got good unit test coverage yet so someone should probably contribute tests to animatplot upstream before xarray officially relies on it. animatplot isn't particularly large, so if we wanted to reimplement something similar in xarray then that would be feasible.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709 https://github.com/pydata/xarray/pull/2729#issuecomment-459358900,https://api.github.com/repos/pydata/xarray/issues/2729,459358900,MDEyOklzc3VlQ29tbWVudDQ1OTM1ODkwMA==,1197350,2019-01-31T14:14:38Z,2019-01-31T14:14:38Z,MEMBER,"I think this is a cool example, and lots of users will probably like it. A high-level question: why was animatplot chosen over matplotlib's animation module?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,404945709