Skip to content

New feature: External Contexts, and bug splats 🐛

Latest

Choose a tag to compare

@cvanelteren cvanelteren released this 22 Nov 00:38
· 14 commits to main since this release
477e187

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

Full Changelog: v1.65.1...v1.66.0