Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/).

### Changed
- `interact2D`: replaced SimpleNamespace object with a dataclass for more explicit typing
- `quick1D`, `quick2D`: will try to wrap titles if they get too long.
- `quick1D`, `quick2D`: refactored for integration with iterators, animations (these functions are wrappers for the class `Quick1DLegacy`, `Quick2DLegacy`).

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions WrightTools/artists/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ def _title(fig, title, subtitle="", *, margin=1, fontsize=20, subfontsize=18):
subfontsize : number (optional)
Subtitle fontsize. Default is 18.
"""
fig.suptitle(title, fontsize=fontsize)
fig.suptitle(title, fontsize=fontsize, wrap=True)
height = fig.get_figheight() # inches
distance = margin / 2.0 # distance from top of plot, in inches
ratio = 1 - distance / height
return fig.text(0.5, ratio, subtitle, fontsize=subfontsize, ha="center", va="top")
return fig.text(0.5, ratio, subtitle, fontsize=subfontsize, ha="center", va="top", wrap=True)


def add_sideplot(
Expand Down
Loading