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-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-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:

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-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()
```

### 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()
```

","{""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