home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 299202380

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1397#issuecomment-299202380 https://api.github.com/repos/pydata/xarray/issues/1397 299202380 MDEyOklzc3VlQ29tbWVudDI5OTIwMjM4MA== 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
}
  225846258
Powered by Datasette · Queries took 0.514ms · About: xarray-datasette