High-Level Overview: This release focuses on intelligent layout management, geographic plotting enhancements, and publication-ready features. Geographic plots receive improved boundary label handling and rotation capabilities, while new Copernicus Publications standard widths support scientific publishing workflows. Various bug fixes and documentation improvements round out this release.
Major Changes:
1. Geographic Plot Enhancements
# Improved boundary labels and rotation
fig, ax = uplt.subplots(projection="cyl")
ax.format(
lonlim=(-180, 180),
latlim=(-90, 90),
lonlabelrotation=45, # new parameter
labels=True,
land=True,
)
# Boundary labels now remain visible and can be rotated2. Copernicus Publications Support
# New standard figure widths for scientific publishing
fig = uplt.figure(journal = "cop1")
# Automatically sets appropriate width for Copernicus Publications3. Legend Placement Improvements
import numpy as np
import ultraplot as uplt
np.random.seed(0)
fig, ax = uplt.subplots(ncols=2, nrows=2)
handles = []
for idx, axi in enumerate(ax):
noise = np.random.randn(100) * idx
angle = np.random.rand() * 2 * np.pi
t = np.linspace(0, 2 * np.pi, noise.size)
y = np.sin(t * angle) + noise[1]
(h,) = axi.plot(t, y, label=f"$f_{idx}$")
handles.append(h)
# New: spanning legends
fig.legend(handles=handles, ax=ax[0, :], span=(1, 2), loc="b")
fig.show()What's Changed
- Bump actions/checkout from 5 to 6 in the github-actions group by @dependabot[bot] in #415
- [pre-commit.ci] pre-commit autoupdate by @pre-commit-ci[bot] in #416
- Add placement of legend to axes within a figure by @cvanelteren in #418
- There's a typo about zerotrim in doc. by @gepcel in #420
- Fix references in documentation for clarity by @gepcel in #421
- fix links to apply_norm by @cvanelteren in #423
- [Feature] add lon lat labelrotation by @cvanelteren in #426
- Fix: Boundary labels now visible when setting lonlim/latlim by @cvanelteren in #429
- Add Copernicus Publications figure standard widths by @Holmgren825 in #433
- Fix 2D indexing for gridpec by @cvanelteren in #435
- Fix GeoAxes panel alignment with aspect-constrained projections by @cvanelteren in #432
- Bump the github-actions group with 2 updates by @dependabot[bot] in #444
- Fix dualx alignment on log axes by @cvanelteren in #443
- Subset label sharing and implicit slice labels for axis groups by @cvanelteren in #440
- Preserve log formatter when setting log scales by @cvanelteren in #437
- Feature: added inference of labels for spanning legends by @cvanelteren in #447
New Contributors
- @gepcel made their first contribution in #420
- @Holmgren825 made their first contribution in #433
Full Changelog: v1.66.0...v1.70.0