home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

4 rows where author_association = "MEMBER", issue = 404945709 and user = 35968931 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: created_at (date)

user 1

  • TomNicholas · 4 ✖

issue 1

  • [WIP] Feature: Animated 1D plots · 4 ✖

author_association 1

  • MEMBER · 4 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
656108033 https://github.com/pydata/xarray/pull/2729#issuecomment-656108033 https://api.github.com/repos/pydata/xarray/issues/2729 MDEyOklzc3VlQ29tbWVudDY1NjEwODAzMw== TomNicholas 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, 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
}
  [WIP] Feature: Animated 1D plots 404945709
489056485 https://github.com/pydata/xarray/pull/2729#issuecomment-489056485 https://api.github.com/repos/pydata/xarray/issues/2729 MDEyOklzc3VlQ29tbWVudDQ4OTA1NjQ4NQ== TomNicholas 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
}
  [WIP] Feature: Animated 1D plots 404945709
488005900 https://github.com/pydata/xarray/pull/2729#issuecomment-488005900 https://api.github.com/repos/pydata/xarray/issues/2729 MDEyOklzc3VlQ29tbWVudDQ4ODAwNTkwMA== TomNicholas 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
}
  [WIP] Feature: Animated 1D plots 404945709
459368801 https://github.com/pydata/xarray/pull/2729#issuecomment-459368801 https://api.github.com/repos/pydata/xarray/issues/2729 MDEyOklzc3VlQ29tbWVudDQ1OTM2ODgwMQ== TomNicholas 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, 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 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
}
  [WIP] Feature: Animated 1D plots 404945709

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 1123.71ms · About: xarray-datasette