home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

10 rows where issue = 200364693 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 5

  • fmaussion 3
  • vnoel 2
  • shoyer 2
  • mathause 2
  • dcherian 1

author_association 2

  • MEMBER 8
  • CONTRIBUTOR 2

issue 1

  • pass projection argument to plt.subplot when faceting with cartopy transform · 10 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
604550471 https://github.com/pydata/xarray/issues/1201#issuecomment-604550471 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDYwNDU1MDQ3MQ== mathause 10194086 2020-03-26T17:02:41Z 2020-03-26T17:02:41Z MEMBER

I think the second example shows this: http://xarray.pydata.org/en/stable/plotting.html#maps

Related: #3169

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
604548587 https://github.com/pydata/xarray/issues/1201#issuecomment-604548587 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDYwNDU0ODU4Nw== dcherian 2448579 2020-03-26T16:59:25Z 2020-03-26T16:59:25Z MEMBER

We should add this to the docs then

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
604531923 https://github.com/pydata/xarray/issues/1201#issuecomment-604531923 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDYwNDUzMTkyMw== mathause 10194086 2020-03-26T16:30:24Z 2020-03-26T16:30:24Z MEMBER

I think this can be closed, as the following works:

```python import cartopy.crs as ccrs import xarray as xr

proj = ccrs.PlateCarree()

ds = xr.tutorial.open_dataset("air_temperature") da = ds.air.isel(time=slice(None, 3)) da.plot(transform=proj, col='time', subplot_kws={'projection':proj}) ```

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272413551 https://github.com/pydata/xarray/issues/1201#issuecomment-272413551 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjQxMzU1MQ== fmaussion 10050469 2017-01-13T10:42:02Z 2017-01-13T10:42:02Z MEMBER

I don't understand what you mean by 'adding you own to the signature'. Adding my own what to what signature?

;-) I meant adding your own keyword argument to the function's signature

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272409178 https://github.com/pydata/xarray/issues/1201#issuecomment-272409178 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjQwOTE3OA== vnoel 731499 2017-01-13T10:19:08Z 2017-01-13T10:19:08Z CONTRIBUTOR

I don't understand what you mean by 'adding you own to the signature'. Adding my own what to what signature?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272398208 https://github.com/pydata/xarray/issues/1201#issuecomment-272398208 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjM5ODIwOA== fmaussion 10050469 2017-01-13T09:26:05Z 2017-01-13T09:26:05Z MEMBER

However it looks like no xarray code contains the transform keyword. However I definitely can use it in calls to plot(). I don't understand what is going on. Can someone enlighten me?

Yes, this is what I meant with xarray not being directly "cartopy aware". The reason is that xarray intends to be a general library, and tries to avoid defining too many keyword arguments in order to avoid confusion. However, xarray passes along any kw argument you want to the underlying mpl plot function (https://github.com/pydata/xarray/blob/master/xarray/plot/plot.py#L379). You'll have to catch it first, either from the kwargs dict or by adding your own to the signature (the latter being recommended only if necessary, for the reason I mentioned above)

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272395987 https://github.com/pydata/xarray/issues/1201#issuecomment-272395987 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjM5NTk4Nw== vnoel 731499 2017-01-13T09:14:30Z 2017-01-13T09:14:30Z CONTRIBUTOR

I am confused.

I planned to identify the plotting function that accepted the transform keyword (used in the code sample above), and add its value in subplot_kws if it wasn't already.

However it looks like no xarray code contains the transform keyword. However I definitely can use it in calls to plot(). I don't understand what is going on. Can someone enlighten me?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272308784 https://github.com/pydata/xarray/issues/1201#issuecomment-272308784 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjMwODc4NA== shoyer 1217238 2017-01-12T22:48:57Z 2017-01-12T22:48:57Z MEMBER

I don't really understand what you mean here. Neither facetted nor non-facetted plots have any logic to greate geoaxes automatically.

Oops, I was indeed mixed up.

If we add a projection argument for faceted plots, we should certainly add it for non-faceted plots, too.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272293971 https://github.com/pydata/xarray/issues/1201#issuecomment-272293971 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjI5Mzk3MQ== fmaussion 10050469 2017-01-12T21:46:53Z 2017-01-12T21:46:53Z MEMBER

This seems totally reasonable to me, and would be nice because it would improve the consistency between facetted and non-facetted plotting.

I don't really understand what you mean here. Neither facetted nor non-facetted plots have any logic to greate geoaxes automatically.

Otherwise, yes, I think that any logic making working with cartopy a little easier would be a good addition. The logic creating the axes is located here

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693
272233221 https://github.com/pydata/xarray/issues/1201#issuecomment-272233221 https://api.github.com/repos/pydata/xarray/issues/1201 MDEyOklzc3VlQ29tbWVudDI3MjIzMzIyMQ== shoyer 1217238 2017-01-12T17:52:19Z 2017-01-12T17:52:19Z MEMBER

This seems totally reasonable to me, and would be nice because it would improve the consistency between facetted and non-facetted plotting.

Going even further, we might even default to projection=ccrs.PlateCarree() if a cartopy transform is provided (see https://github.com/SciTools/cartopy/issues/645).

@fmaussion @jhamman any opinions?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  pass projection argument to plt.subplot when faceting with cartopy transform 200364693

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 14.791ms · About: xarray-datasette
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows