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/issues/2355#issuecomment-412969792,https://api.github.com/repos/pydata/xarray/issues/2355,412969792,MDEyOklzc3VlQ29tbWVudDQxMjk2OTc5Mg==,35968931,2018-08-14T18:25:06Z,2018-08-14T18:25:06Z,MEMBER,"> we should return Animation objects So if you made a 2D animated plot, you would return an instance of an animation object, from which you can also get the blocks for the imshow, the colorbar, the title etc. That would be neater for single plots, but if you wanted to create an [animation with two plots](https://animatplot.readthedocs.io/en/latest/tutorial/blocks..html), you would need something like: ``` python turb2d = xr.load_dataset(""turbulent_fluid_data.nc"") # Create individual animations imshow_animation, imshow_blocks = turb2d[""density""].plot.imshow(animate_over='time') line_animation, line_blocks = turb2d[""density""].mean(dim='z').plot.line(animate_over='time') # Create animation with both plots on same figure anim = amp.Animate(imshow_blocks, line_blocks) # Save the combined gif anim.save_gif(""fluid_density.gif"") plt.show() ``` However the initialisation of the `Animation` object is when the animation is actually created, so you would create 3 animations with that code! Is this actually what you mean or have I misunderstood?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,349026158 https://github.com/pydata/xarray/issues/2355#issuecomment-412377245,https://api.github.com/repos/pydata/xarray/issues/2355,412377245,MDEyOklzc3VlQ29tbWVudDQxMjM3NzI0NQ==,1217238,2018-08-12T22:48:45Z,2018-08-12T22:48:45Z,MEMBER,"Xarray's plotting APIs general work for *either* figure or axis level plotting. But they don't handle explicit subplots -- for those use cases it usually makes sense to switch into matplotlib for more control. My inclination is in xarray we should return `Animation` objects, from which the `blocks` attribute could be extracted if need be for further customization with animatplot. Most plotting methods will return an animation consisting of a single blocks, but some of these would actually return multiple blocks (e.g., for plotting multiple lines at once).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,349026158 https://github.com/pydata/xarray/issues/2355#issuecomment-412318965,https://api.github.com/repos/pydata/xarray/issues/2355,412318965,MDEyOklzc3VlQ29tbWVudDQxMjMxODk2NQ==,1217238,2018-08-12T05:01:58Z,2018-08-12T05:01:58Z,MEMBER,"This looks pretty handy to me, too! What are the advantages of returning a ""block"" rather than an animation object consisting of a single block? I don't entirely understand why animatplot adds a notion of blocks in addition to matplotlib's axis.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,349026158 https://github.com/pydata/xarray/issues/2355#issuecomment-412306576,https://api.github.com/repos/pydata/xarray/issues/2355,412306576,MDEyOklzc3VlQ29tbWVudDQxMjMwNjU3Ng==,2448579,2018-08-11T22:51:45Z,2018-08-11T22:51:45Z,MEMBER,I would love this feature. It is definitely a common use case in the Earth sciences. ,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,349026158 https://github.com/pydata/xarray/issues/2355#issuecomment-412246705,https://api.github.com/repos/pydata/xarray/issues/2355,412246705,MDEyOklzc3VlQ29tbWVudDQxMjI0NjcwNQ==,6815844,2018-08-11T03:05:15Z,2018-08-11T03:05:15Z,MEMBER,"I personally like this idea, as I often want to make an animated plot. How do any @pydata/xarray members think? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,349026158