home / github / issues

Menu
  • GraphQL API
  • Search all tables

issues: 114576415

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
114576415 MDU6SXNzdWUxMTQ1NzY0MTU= 642 Add a keyword to prevent divergent plot params 10050469 closed 0     16 2015-11-02T11:27:44Z 2015-11-16T08:41:13Z 2015-11-16T08:41:13Z MEMBER      

I kinda agree with the default behaviour which is to consider the data as divergent when it contains "zero", but there should be an easy way to avoid this. Maybe I overlooked this but the utils._determine_cmap_params is quite intrusive:

``` python # Simple heuristics for whether these data should have a divergent map divergent = ((vmin < 0) and (vmax > 0)) or center is not None

# Now set center to 0 so math below makes sense
if center is None:
    center = 0

# A divergent map should be symmetric around the center value
if divergent:
    vlim = max(abs(vmin - center), abs(vmax - center))
    vmin, vmax = -vlim, vlim

```

This will override the user's vmin, vmax without giving him an opportunity to change this behaviour. What about a divergent=False keyword or something?

I'd be happy to submit a PR if found useful.

Thanks,

Fabien

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/642/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 1 row from issues_id in issues_labels
  • 16 rows from issue in issue_comments
Powered by Datasette · Queries took 0.609ms · About: xarray-datasette