home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where issue = 423774214 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 3

  • dcherian 3
  • aldanor 2
  • shoyer 1

author_association 2

  • MEMBER 4
  • NONE 2

issue 1

  • DataArray plotting: pyplot compat and passing the style · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
482186103 https://github.com/pydata/xarray/issues/2837#issuecomment-482186103 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ4MjE4NjEwMw== dcherian 2448579 2019-04-11T16:25:49Z 2019-04-11T16:25:49Z MEMBER

@aldanor Would you like to tackle this problem and send in a PR?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214
475491950 https://github.com/pydata/xarray/issues/2837#issuecomment-475491950 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ3NTQ5MTk1MA== shoyer 1217238 2019-03-22T04:41:12Z 2019-03-22T04:41:12Z MEMBER

I would support adding style keyword argument matching pandas. It's kind of weird that we let you pass it only as a positional argument currently. In fact, I think the only reason why we accept positional arguments in plot.line() at all is because I wanted to allow style strings.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214
475284043 https://github.com/pydata/xarray/issues/2837#issuecomment-475284043 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ3NTI4NDA0Mw== aldanor 2418513 2019-03-21T15:43:56Z 2019-03-21T15:58:23Z NONE

matplotlib only knows about numpy arrays so plt.plot(arr, ...) will act like plt.plot(arr.values, ...) by design.

How does it (matplotlib) preserve Series index then?

style is pandas-only kwarg (xarray lightly wraps matplotlib)

Would it make sense to make it (DA plotting interface) a bit more pandas-compatible by supporting style? Given that it copies pandas syntax like arr.plot.line() anyway...

Also, if plot() is meant to be a thin wrapper around matplotlib, it should support positional arguments, since you can do plt.plot(x, y, '.-') just fine, but da.plot('.-') fails complaining about unexpected positional arguments.

Currently, neither of the two options above work, making DA plot interface inferior to both raw matplotlib and pandas.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214
475289244 https://github.com/pydata/xarray/issues/2837#issuecomment-475289244 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ3NTI4OTI0NA== aldanor 2418513 2019-03-21T15:55:13Z 2019-03-21T15:55:13Z NONE

I think it plots assuming that the index is [0:len(da.values)].

Nope. It plots datetime index just fine.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214
475288698 https://github.com/pydata/xarray/issues/2837#issuecomment-475288698 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ3NTI4ODY5OA== dcherian 2448579 2019-03-21T15:54:07Z 2019-03-21T15:54:07Z MEMBER

How does it (matplotlib) preserve Series index then?

I think it plots assuming that the index is [0:len(da.values)].

ping @pydata/xarray for opinions on adding the style kwarg. I prefer that to the non-explicit da.plot('.-') syntax.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214
475274420 https://github.com/pydata/xarray/issues/2837#issuecomment-475274420 https://api.github.com/repos/pydata/xarray/issues/2837 MDEyOklzc3VlQ29tbWVudDQ3NTI3NDQyMA== dcherian 2448579 2019-03-21T15:23:14Z 2019-03-21T15:23:14Z MEMBER

style is pandas-only kwarg (xarray lightly wraps matplotlib)

matplotlib only knows about numpy arrays so plt.plot(arr, ...) will act like plt.plot(arr.values, ...) by design.

the way to do what you want is using kwargs arr.plot.line(marker='.', ls='-'). plt.plot doesn't accept fmt='.-' so there's not much we can do to support that format string syntax.

Can you open a PR to improve the documentation on these points please?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  DataArray plotting: pyplot compat and passing the style 423774214

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