home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where issue = 225846258 and user = 10050469 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 1

  • fmaussion · 7 ✖

issue 1

  • Changing projections under plot() · 7 ✖

author_association 1

  • MEMBER 7
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
299202380 https://github.com/pydata/xarray/issues/1397#issuecomment-299202380 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5OTIwMjM4MA== fmaussion 10050469 2017-05-04T14:30:46Z 2017-05-04T14:30:46Z MEMBER

OK, I've had success with ax.set_aspect('equal', 'box-forced'):

python p = ano.T2M.plot(col='month', col_wrap=4, transform=ccrs.PlateCarree(), subplot_kws={'projection': ccrs.PlateCarree()}); for ax in p.axes.flat: ax.add_feature(cartopy.feature.BORDERS) ax.add_feature(cartopy.feature.COASTLINE) ax.set_extent([70, 100, 25, 40]) ax.set_aspect('equal', 'box-forced')

Note that the result will look better if you set aspect in xarray's facetgrid first, since it will decide on a cleverer figsize based on this information:

python p = ano.T2M.plot(col='month', col_wrap=4, transform=ccrs.PlateCarree(), aspect=ds.dims['lon']/ds.dims['lat'], subplot_kws={'projection': ccrs.PlateCarree()}); for ax in p.axes.flat: ax.add_feature(cartopy.feature.BORDERS) ax.add_feature(cartopy.feature.COASTLINE) ax.set_extent([70, 100, 25, 40]) ax.set_aspect('equal', 'box-forced')

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
299193840 https://github.com/pydata/xarray/issues/1397#issuecomment-299193840 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5OTE5Mzg0MA== fmaussion 10050469 2017-05-04T14:01:37Z 2017-05-04T14:01:37Z MEMBER

aspect='auto' does "work", but it looks ugly because it doesn't preserve aspect ratio:

The default is aspect='equal', which is good for the maps geometry but it shouldn't be ignored by the axes of the facetgrid, I think we have to do something on the xarray side here, unless there is a way to preserve the aspect ratio already. I'll dig into this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
299190567 https://github.com/pydata/xarray/issues/1397#issuecomment-299190567 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5OTE5MDU2Nw== fmaussion 10050469 2017-05-04T13:49:40Z 2017-05-04T13:49:40Z MEMBER

@darothen did you find out how to control the map extent in facetgrids? See this example:

python p = ano.T2M.plot(col='month', col_wrap=4, transform=ccrs.PlateCarree(), subplot_kws={'projection': ccrs.PlateCarree()}); for ax in p.axes.flat: ax.add_feature(cartopy.feature.BORDERS) ax.add_feature(cartopy.feature.COASTLINE) ax.set_extent([70, 100, 25, 40]) Cartopy basically ignores my ``extent'' since it wants to make the plots more quadratic than they should:

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
299049285 https://github.com/pydata/xarray/issues/1397#issuecomment-299049285 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5OTA0OTI4NQ== fmaussion 10050469 2017-05-03T22:06:16Z 2017-05-03T22:06:16Z MEMBER

What is it exactly what you are trying to do?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
299009125 https://github.com/pydata/xarray/issues/1397#issuecomment-299009125 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5OTAwOTEyNQ== fmaussion 10050469 2017-05-03T19:19:59Z 2017-05-03T19:19:59Z MEMBER

it's simple to add the colorbar, but not easy to make it horizontal

You can try:

ds.Tair[0].plot.pcolormesh(ax=ax, transform=ccrs.PlateCarree(), x='xc', y='yc', cbar_kwargs={'orientation':'horizontal'});

xarray plotting tools, which are useful for quick checks, but not publication-quality figures?

Yes, as a general purpose tool xarray will try to avoid the proliferation of keyword arguments. If you have very specific needs you might need to tweak the plots yourself. Fortunately, this is easy to do on top of xarray since you can control the axes, plots, and so on.

We could add more advanced examples to the docs though (for example in the gallery I had no time to add yet :( )

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
298855171 https://github.com/pydata/xarray/issues/1397#issuecomment-298855171 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5ODg1NTE3MQ== fmaussion 10050469 2017-05-03T08:49:23Z 2017-05-03T08:49:23Z MEMBER

This is what I get:

```python import xarray as xr import cartopy import cartopy.crs as ccrs import matplotlib import matplotlib.pyplot as plt %matplotlib inline

print(xr.version) print(cartopy.version) print(matplotlib.version)

ds = xr.tutorial.load_dataset('rasm') plt.figure(figsize=(14, 4)); ax = plt.axes(projection=ccrs.Robinson()); ds.Tair[0].plot.pcolormesh(ax=ax, transform=ccrs.PlateCarree(), x='xc', y='yc', add_colorbar=False); ax.coastlines(); plt.tight_layout(); ```

0.9.5-1-gab4ffee 0.14.2 2.0.0

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258
298832853 https://github.com/pydata/xarray/issues/1397#issuecomment-298832853 https://api.github.com/repos/pydata/xarray/issues/1397 MDEyOklzc3VlQ29tbWVudDI5ODgzMjg1Mw== fmaussion 10050469 2017-05-03T06:32:56Z 2017-05-03T06:32:56Z MEMBER

I don't have this problem. did you use the code from the documentation?

http://xarray.pydata.org/en/latest/examples/multidimensional-coords.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  Changing projections under plot() 225846258

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