Skip to content

UltraPlot 2.7.5: Discrete colormap and vcenter fixes

Choose a tag to compare

@cvanelteren cvanelteren released this 16 Nov 11:23
aff3f19

UltraPlot 2.7.5 fixes discrete colormap endpoint handling and restores the vcenter keyword for diverging color scales.

Bug Fixes

  • Custom below-range colors: Setting a custom under color now frees the correct end of a continuous colormap when it is divided into discrete bins. With extend="both", the lowest bin can use the low endpoint while the high endpoint remains reserved for above-range values. The fix also corrects endpoint reservation for extend="min" and extend="max" (#863).
Identical synthetic fields before and after the fix. Previously, the highest bin and above-range values were both yellow. After the fix, the highest bin is green and above-range values remain yellow.

Both panels use identical data, five bins from 0 to 1, the viridis colormap, a black below-range color, and extensions at both ends. Before the fix, values from 0.8 to 1 were indistinguishable from values above 1. After the fix, the above-range color is distinct and the lowest bin uses the full low endpoint. PNG, SVG, PDF, and the reproducible plotting script are included as release assets.

  • Diverging color-scale centers: vcenter is accepted directly or through norm_kw and selects a diverging normalizer when norm is omitted. When passing a preconstructed normalizer, set its center in the constructor instead. Combining a normalizer instance with a separate vcenter now raises a clear error (#860, fixes #639).

Maintenance

  • Replaced skipped plotting tests with regression checks (#859).
  • Added coverage for custom under/over colors across both contourf and pcolormesh, sequential and diverging colormaps, and every extension setting.

What's Changed

Full Changelog: v2.7.4...v2.7.5

What's Changed

Full Changelog: v2.7.4...v2.7.5