home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

9 rows where issue = 349026158 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date), updated_at (date)

user 7

  • shoyer 2
  • t-makaro 2
  • dcherian 1
  • fujiisoup 1
  • fischcheng 1
  • stale[bot] 1
  • TomNicholas 1

author_association 2

  • MEMBER 5
  • NONE 4

issue 1

  • Animated plots - a suggestion for implementation · 9 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
658527067 https://github.com/pydata/xarray/issues/2355#issuecomment-658527067 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDY1ODUyNzA2Nw== stale[bot] 26384082 2020-07-15T03:39:56Z 2020-07-15T03:39:56Z NONE

In order to maintain a list of currently relevant issues, we mark issues as stale after a period of inactivity

If this issue remains relevant, please comment here or remove the stale label; otherwise it will be marked as closed automatically

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animated plots - a suggestion for implementation 349026158
412980710 https://github.com/pydata/xarray/issues/2355#issuecomment-412980710 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjk4MDcxMA== t-makaro 18018386 2018-08-14T19:01:06Z 2018-08-14T19:01:06Z NONE

Yes, this would have created 3 animations. Matplotlib requires a reference to an animation to be held. So, del imshow_animation del line_animation should effectively remove the 2 additional animations. Though this is cumbersome.

You might be able to add blocks in an existing animation by: anim.blocks.append(extra_block) since the animation object stores the blocks as a list, but this is currently undocumented and circumvents the check to ensure that all blocks are the same length. (I haven't tested it, but so long as the added block is at least as long as the other blocks it should work.)

Another thing to consider is that animations also take an optional "Timeline" which holds the values of time at each frame of the animation, which can be displayed using the timeline_slider method. Though, I think I have an idea for a title block.... (lots of ideas on the go for the next release of animatplot).

From what I understand of xarray, the timeline object can be constructed using coords. If you return blocks, the you may want to return this timeline object.

I'd probably lean towards xarray returning the animation. In that case, the internal implementation may want to create a new matplotlib figure for each of the animation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animated plots - a suggestion for implementation 349026158
412969792 https://github.com/pydata/xarray/issues/2355#issuecomment-412969792 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjk2OTc5Mg== TomNicholas 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, 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 theAnimation` 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
}
  Animated plots - a suggestion for implementation 349026158
412377245 https://github.com/pydata/xarray/issues/2355#issuecomment-412377245 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjM3NzI0NQ== shoyer 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
}
  Animated plots - a suggestion for implementation 349026158
412324246 https://github.com/pydata/xarray/issues/2355#issuecomment-412324246 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjMyNDI0Ng== t-makaro 18018386 2018-08-12T07:26:08Z 2018-08-12T07:26:08Z NONE

Matplotlib's axis is a place to plot stuff. Animatplot's blocks are "things" that are to be animated. Multiple blocks can be attached to a single axis like multiple lines or a pcolormesh + quiver plot. Right now, all of the blocks animate data, but in the future there will be blocks that animate annotations or modify some axis settings.

Maybe you'll prefer to return an animation with a single block, but if you return the block then you can combine it with more blocks. You could animate two imshow's side by side. Now, I believe that matplotlib does have the ability to attach multiple animations to a single figure, but that could cause issues with syncing, and animatplot's controls would likely (read should) control each animation individually.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animated plots - a suggestion for implementation 349026158
412318965 https://github.com/pydata/xarray/issues/2355#issuecomment-412318965 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjMxODk2NQ== shoyer 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
}
  Animated plots - a suggestion for implementation 349026158
412306576 https://github.com/pydata/xarray/issues/2355#issuecomment-412306576 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjMwNjU3Ng== dcherian 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
}
  Animated plots - a suggestion for implementation 349026158
412250048 https://github.com/pydata/xarray/issues/2355#issuecomment-412250048 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjI1MDA0OA== fischcheng 7747527 2018-08-11T04:31:12Z 2018-08-11T04:31:12Z NONE

I want this feature, and the way you proposed is very elegant! The last time I made an animation, I needed to output each frames to .png and packed them as a movie file using imagemagick. I would love to see this feature realized!!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Animated plots - a suggestion for implementation 349026158
412246705 https://github.com/pydata/xarray/issues/2355#issuecomment-412246705 https://api.github.com/repos/pydata/xarray/issues/2355 MDEyOklzc3VlQ29tbWVudDQxMjI0NjcwNQ== fujiisoup 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
}
  Animated plots - a suggestion for implementation 349026158

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [performed_via_github_app] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
);
CREATE INDEX [idx_issue_comments_issue]
    ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
    ON [issue_comments] ([user]);
Powered by Datasette · Queries took 26.41ms · About: xarray-datasette