home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 156035236

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/pull/655#issuecomment-156035236 https://api.github.com/repos/pydata/xarray/issues/655 156035236 MDEyOklzc3VlQ29tbWVudDE1NjAzNTIzNg== 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
}
  116349205
Powered by Datasette · Queries took 0.693ms · About: xarray-datasette