Github user agoodm commented on a diff in the pull request:
https://github.com/apache/climate/pull/67#discussion_r13513738
--- Diff: ocw/plotter.py ---
@@ -61,8 +61,19 @@ def _nice_intervals(data, nlevs):
# Find the min and max levels by cutting off the tails of the
distribution
# This mitigates the influence of outliers
data = data.ravel()
- mnlvl = mstats.scoreatpercentile(data, 5)
- mxlvl = mstats.scoreatpercentile(data, 95)
+ mn = mstats.scoreatpercentile(data, 5)
+ mx = mstats.scoreatpercentile(data, 95)
+ #if there min less than 0 then
+ #put 0 in center of color bar
+ if mn < 0:
--- End diff --
This line should be changed to
```python
if mn < 0 and mx > 0:
```
because otherwise you will end up centering the contours at 0 when the
maximum value is negative. This results in superfluous contour levels.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---