home / github

Menu
  • GraphQL API
  • Search all tables

issue_comments

Table actions
  • GraphQL API for issue_comments

21 rows where issue = 116349205 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 4

  • fmaussion 10
  • mwaskom 5
  • shoyer 5
  • jhamman 1

author_association 2

  • MEMBER 16
  • NONE 5

issue 1

  • More control on cmap params · 21 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions performed_via_github_app issue
156864017 https://github.com/pydata/xarray/pull/655#issuecomment-156864017 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njg2NDAxNw== shoyer 1217238 2015-11-15T22:20:04Z 2015-11-15T22:20:04Z MEMBER

Thanks @fmaussion!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156863563 https://github.com/pydata/xarray/pull/655#issuecomment-156863563 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njg2MzU2Mw== mwaskom 315810 2015-11-15T22:18:13Z 2015-11-15T22:18:13Z NONE

Oh, sorry. LGTM.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156861015 https://github.com/pydata/xarray/pull/655#issuecomment-156861015 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njg2MTAxNQ== shoyer 1217238 2015-11-15T22:07:02Z 2015-11-15T22:07:02Z MEMBER

OK, this looks good to me. I'm just waiting on @mwaskom before merging.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156798769 https://github.com/pydata/xarray/pull/655#issuecomment-156798769 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njc5ODc2OQ== fmaussion 10050469 2015-11-15T10:11:30Z 2015-11-15T10:11:30Z MEMBER

Right, I forgot to fetch from upstream, now it should be all clean.

This PR was a good experience for me! I started using xray a few weeks ago for teaching and it's really awesome to see how students with no prior experience with python are able to get the logic of working with reanalysis data so quickly...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156758224 https://github.com/pydata/xarray/pull/655#issuecomment-156758224 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njc1ODIyNA== shoyer 1217238 2015-11-14T23:36:18Z 2015-11-14T23:36:18Z MEMBER

@fmaussion try pulling the latest master and rebasing this branch? If that doesn't work for you, I can apply this change manually.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156743832 https://github.com/pydata/xarray/pull/655#issuecomment-156743832 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1Njc0MzgzMg== fmaussion 10050469 2015-11-14T20:23:42Z 2015-11-14T20:27:40Z MEMBER

Ups. I did a "fixup" which seems to have broken github. I'm sorry for the mess... What should I do now? I tried it locally and my branch (which consists one one single commit now) can be fast-merged...

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156611108 https://github.com/pydata/xarray/pull/655#issuecomment-156611108 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NjYxMTEwOA== shoyer 1217238 2015-11-14T02:25:02Z 2015-11-14T02:25:02Z MEMBER

This looks good to be -- the tests seem to nail this down pretty well, even though the logic has indeed become more convoluted. @mwaskom any concerns from your side?

Please do do a rebase/squash (most importantly to eliminate any commits that failed CI) and also please add a shirt change note to a "breaking changes" section of the what's new docs. This will probably not make it in until the 0.7 release (which probably will be our next release), but just go ahead and put it in the 0.6.2 notes for now and we'll reorganize later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156404409 https://github.com/pydata/xarray/pull/655#issuecomment-156404409 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NjQwNDQwOQ== fmaussion 10050469 2015-11-13T11:37:28Z 2015-11-13T11:37:28Z MEMBER

I've incorporated both comments and added the documentation. Let me know if it still needs revision. Should I do a rebase?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156036272 https://github.com/pydata/xarray/pull/655#issuecomment-156036272 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NjAzNjI3Mg== fmaussion 10050469 2015-11-12T08:51:09Z 2015-11-12T08:51:09Z MEMBER

I forgot to mention: I tried to reach a compromise between @jhamman and @shoyer in the following:

python # Setting non-centered vmin, vmax prevents a divergent cmap if (vmin is not None) and (vmax is not None): if not np.isclose(vmax - center, center - vmin): divergent = False

I don't know if np.isclose() is good enough for the numerical issues @shoyer mentioned.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
156035236 https://github.com/pydata/xarray/pull/655#issuecomment-156035236 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NjAzNTIzNg== fmaussion 10050469 2015-11-12T08:45:22Z 2015-11-12T08:45:22Z MEMBER

Hi @jhamman,

  1. If you set anything, it should not be overwritten. This includes the colormap and vmin/vmax.
  2. If you want very specific/consistent behavior, you'll need to explicitly provide those arguments.

This is the actual purpose of my PR.

The only safe times to assume a diverging colormap is when vmin = -vmax or when center is not None. If you want a diverging colormap for other situations, you need to specify cmap in the plot call.

I tend to agree with that but this would break backwards compatibility. Previous behavior was to decide that if vmin < 0, we have a diverging cmap. This logic remains in my PR, but I can change it if you gurus decide otherwise.

Some of the specs added a bit of boilerplate code, especially that one:

if only one of vmin/max is provided and the colormap is diverging, then the other should be determined by reflecting the limit around the center

but my changes remain quite small and seem to have preserved backwards compatibility. I tried to cover all the use cases in my test function (test_divergentcontrol).

Critics and/or additional use cases welcome.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155918906 https://github.com/pydata/xarray/pull/655#issuecomment-155918906 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTkxODkwNg== shoyer 1217238 2015-11-11T21:43:03Z 2015-11-11T21:43:03Z MEMBER
  1. The only safe times to assume a diverging colormap is when vmin = -vmax or when center is not None. If you want a diverging colormap for other situations, you need to specify cmap in the plot call.

I actually agree with @mwaskom here. I would not make inferring a diverging colormap dependent on vmin = -vmax (assuming center=0). It's useful to be able to control the bounds of a diverging colormap by only setting one of vmin and vmax, and comparing vmin - center == center - vmax seems prone to numerical precision issues.

I do agree with principles 1 and 2, though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155884053 https://github.com/pydata/xarray/pull/655#issuecomment-155884053 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTg4NDA1Mw== mwaskom 315810 2015-11-11T19:21:01Z 2015-11-11T19:21:01Z NONE

The only safe times to assume a diverging colormap is when vmin = -vmax or when center is not None. If you want a diverging colormap for other situations, you need to specify cmap in the plot call.

That's fine for xray to have that opinion. Unfortunately, I think it's going to mean the behavior is going to diverge (heh) from what happens in seaborn.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155882953 https://github.com/pydata/xarray/pull/655#issuecomment-155882953 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTg4Mjk1Mw== jhamman 2443309 2015-11-11T19:16:20Z 2015-11-11T19:16:20Z MEMBER

I'll just chime in here quickly and layout how I think this should go - 1. If you set anything, it should not be overwritten. This includes the colormap and vmin/vmax. 2. If you want very specific/consistent behavior, you'll need to explicitly provide those arguments. 3. The only safe times to assume a diverging colormap is when vmin = -vmax or when center is not None. If you want a diverging colormap for other situations, you need to specify cmap in the plot call.

All in all, I think what I'm getting at is we may want to tighten up on when we switch from the default cmap to the diverging cmap.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155834854 https://github.com/pydata/xarray/pull/655#issuecomment-155834854 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgzNDg1NA== fmaussion 10050469 2015-11-11T16:26:13Z 2015-11-11T16:26:13Z MEMBER

OK, my last push will probably brake some tests. You can have a look at my code and test-cases to see if you agree with the behaviour. I have to go home now, but I can work on this again tomorrow morning (CET)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155831140 https://github.com/pydata/xarray/pull/655#issuecomment-155831140 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgzMTE0MA== fmaussion 10050469 2015-11-11T16:14:39Z 2015-11-11T16:14:39Z MEMBER

Including this last change (if both vmin and vmax are provided, the logic is that of a non-divergent cmap) brakes several tests.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155820962 https://github.com/pydata/xarray/pull/655#issuecomment-155820962 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgyMDk2Mg== mwaskom 315810 2015-11-11T15:42:15Z 2015-11-11T16:05:35Z NONE

That's the behavior I would want seaborn to have, but I guess @shoyer can weigh in too since it affects xray as well.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155827290 https://github.com/pydata/xarray/pull/655#issuecomment-155827290 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgyNzI5MA== fmaussion 10050469 2015-11-11T16:03:57Z 2015-11-11T16:03:57Z MEMBER

Ok, I have come up with something not too complicated. But before I push the changes, do we agree that when both vmin and vmax are provided, the logic is that of a non-divergent cmap?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155820563 https://github.com/pydata/xarray/pull/655#issuecomment-155820563 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgyMDU2Mw== fmaussion 10050469 2015-11-11T15:40:34Z 2015-11-11T15:41:16Z MEMBER

OK, so the test case would look like:

python data = np.linspace(0, 1, num=100) - 0.1 cmap_params = _determine_cmap_params(data, vmin=-0.1) self.assertEqual(cmap_params['vmin'], -0.1) self.assertEqual(cmap_params['vmax'], 0.1) self.assertEqual(cmap_params['cmap'], "RdBu_r")

This of course requires a bit more logic than the simple cases I handled in the first PR. I'll do my best.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155819176 https://github.com/pydata/xarray/pull/655#issuecomment-155819176 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgxOTE3Ng== mwaskom 315810 2015-11-11T15:35:16Z 2015-11-11T15:35:16Z NONE

I think that if nothing else than preserving some backwards compatibility, you should take the route that shoyer suggested and assume that data spanning 0 with center not explicitly set and at most one of the limits specified should get a diverging palette.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155817937 https://github.com/pydata/xarray/pull/655#issuecomment-155817937 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgxNzkzNw== fmaussion 10050469 2015-11-11T15:32:29Z 2015-11-11T15:32:29Z MEMBER

@mwaskom correct. I forgot to read @shoyer 's comments about this. He said:

If only one of vmin/max is provided and the colormap is diverging, then the other should be determined by reflecting the limit around the center -- not by taking the largest distance from the center. If this results in data falling beyond the color limits, then so be it (in xray, this will be displayed with the extend argument on the colorbar). For example, suppose my data contains values between -10 and 100. If I plot it with vmin=-10 and vmax=None, then (1) we should detect diverging data with center=0 (unless center=False) and (2) we should infer vmax=10.

I agree with this, but only if center is explicitly provided. I'll try to implement this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205
155814771 https://github.com/pydata/xarray/pull/655#issuecomment-155814771 https://api.github.com/repos/pydata/xarray/issues/655 MDEyOklzc3VlQ29tbWVudDE1NTgxNDc3MQ== mwaskom 315810 2015-11-11T15:23:12Z 2015-11-11T15:23:12Z NONE

It seems like this will use sequential logic if you set center to a value and only one of vmin or vmax? I would think in that case it looks like the user is asking for a diverging palette.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  More control on cmap params 116349205

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