Release Notes
This release introduces two key improvements to enhance compatibility and consistency.
External Contexts
UltraPlot provides sensible defaults by controlling matplotlib's internal mechanics and applying overrides when needed. While this approach works well in isolation, it can create conflicts when integrating with external libraries.
We've introduced a new external context that disables UltraPlot-specific features when working with third-party libraries. Currently, this context prevents conflicts with internally generated labels in Seaborn plots. We plan to extend this functionality to support broader library compatibility in future releases.
Example usage with Seaborn:
import seaborn as sns
import ultraplot as uplt
# Load example dataset
tips = sns.load_dataset("tips")
# Use external context to avoid label conflicts
fig, ax = uplt.subplots()
with ax.external():
sns.lineplot(data=tips, x="size", y="total_bill", hue="day", ax = ax)Standardized Binning Functions
We've standardized the default aggregation function across all binning operations to use sum. This change affects hexbin, which previously defaulted to averaging values. All binning functions now consistently use sum as the default, though you can specify any custom aggregation function via the reduce_C_function parameter.
What's Changed
- Hotfix: unsharing causes excessive draw in jupyter by @cvanelteren in #411
- Hotfix: bar labels cause limit to reset for unaffected axis. by @cvanelteren in #413
- fix: change default
reduce_C_functiontonp.sumforhexbinby @beckermr in #408 - Add external context mode for axes by @cvanelteren in #406
Full Changelog: v1.65.1...v1.66.0