Skip to content

feat: reinstate title_prefix on all matplotlib subplot panel titles#428

Merged
Jammy2211 merged 3 commits intomainfrom
feature/title-prefix-subplots
Apr 7, 2026
Merged

feat: reinstate title_prefix on all matplotlib subplot panel titles#428
Jammy2211 merged 3 commits intomainfrom
feature/title-prefix-subplots

Conversation

@Jammy2211
Copy link
Copy Markdown
Collaborator

Summary

Threads title_prefix from Plotter.title_prefix down through all subplot_* plot functions in the autolens visualisation layer. This is the PyAutoLens companion to PyAutoLabs/PyAutoGalaxy#333 — identical feature reinstatement for the lensing-specific subplots (imaging multi-plane, interferometer, tracer, and point-source datasets).

API Changes

New optional title_prefix: str = None parameter added to all subplot_* functions. Fully backwards-compatible — no existing arguments removed or renamed.

See full details below.

Test Plan

  • 245 unit tests pass (python -m pytest test_autolens/ -x)
  • All affected modules import cleanly
Full API Changes (for automation & release notes)

Added (new optional parameter — backwards-compatible)

autolens/imaging/plot/fit_imaging_plots.py

  • subplot_fit(..., title_prefix=None)
  • subplot_fit_x1_plane(..., title_prefix=None)
  • subplot_fit_log10(..., title_prefix=None)
  • subplot_fit_log10_x1_plane(..., title_prefix=None)
  • subplot_of_planes(..., title_prefix=None)
  • subplot_tracer_from_fit(..., title_prefix=None)
  • subplot_fit_combined(..., title_prefix=None)
  • subplot_fit_combined_log10(..., title_prefix=None)

autolens/interferometer/plot/fit_interferometer_plots.py

  • subplot_fit(..., title_prefix=None)
  • subplot_fit_dirty_images(..., title_prefix=None)
  • subplot_fit_real_space(..., title_prefix=None)
  • subplot_tracer_from_fit(..., title_prefix=None)

autolens/lens/plot/tracer_plots.py

  • subplot_tracer(..., title_prefix=None)
  • subplot_lensed_images(..., title_prefix=None)
  • subplot_galaxies_images(..., title_prefix=None)

autolens/point/plot/fit_point_plots.py

  • subplot_fit(..., title_prefix=None)

autolens/point/plot/point_dataset_plots.py

  • subplot_dataset(..., title_prefix=None)

Changed Behaviour (Plotter methods now forward title_prefix)

PlotterImaging, PlotterInterferometer, PlotterPoint, and the base Plotter in autolens/analysis/plotter.py now pass title_prefix=self.title_prefix when calling the above subplot functions.

Migration

No migration needed — all changes are additive with None defaults.

🤖 Generated with Claude Code

Jammy2211 and others added 3 commits April 7, 2026 19:10
Thread title_prefix from Plotter.title_prefix down through all subplot_*
plot functions: imaging (subplot_fit, x1_plane, log10, combined, of_planes,
tracer_from_fit), interferometer (fit, dirty_images, real_space, tracer),
tracer (subplot_tracer, lensed_images, galaxies_images), and point dataset
plots. Matches the PyAutoGalaxy change for the autolens visualisation layer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All `_pf` lambdas now use `title_prefix.rstrip()` + a space before the
panel title, so "VIS" and "VIS " both produce "VIS Data".  The same
fix is applied to the `_prefix` pattern in point dataset / fit plots.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 merged commit f667b5d into main Apr 7, 2026
2 checks passed
@Jammy2211 Jammy2211 deleted the feature/title-prefix-subplots branch April 7, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant