Skip to content

Commit 913002e

Browse files
authored
Revert "Fix edge case where vcenter is not properly set for diverging norms (…" (#337)
This reverts commit 644e1d0.
1 parent dc027b2 commit 913002e

File tree

2 files changed

+1
-44
lines changed

2 files changed

+1
-44
lines changed

ultraplot/axes/plot.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,13 +2707,6 @@ def _parse_cmap(
27072707

27082708
# Create the continuous normalizer.
27092709
norm = _not_none(norm, "div" if "diverging" in trues else "linear")
2710-
# If using a diverging norm, fair=True, and vcenter not set, default to midpoint
2711-
if norm in ("div", "diverging") or "diverging" in trues:
2712-
fair = norm_kw.get("fair", True) # defaults to True
2713-
vcenter = norm_kw.get("vcenter", 0)
2714-
if fair and vcenter is None and vmin is not None and vmax is not None:
2715-
vcenter = 0.5 * (vmin + vmax)
2716-
norm_kw["vcenter"] = vcenter
27172710
if isinstance(norm, mcolors.Normalize):
27182711
norm.vmin, norm.vmax = vmin, vmax
27192712
else:
@@ -2946,6 +2939,7 @@ def _parse_level_lim(
29462939
f"Incompatible arguments vmin={vmin!r}, vmax={vmax!r}, and "
29472940
"symmetric=True. Ignoring the latter."
29482941
)
2942+
29492943
return vmin, vmax, kwargs
29502944

29512945
def _parse_level_num(

ultraplot/tests/test_color.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)