feat: reinstate title_prefix on all matplotlib subplot panel titles#428
Merged
feat: reinstate title_prefix on all matplotlib subplot panel titles#428
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Threads
title_prefixfromPlotter.title_prefixdown through allsubplot_*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 = Noneparameter added to allsubplot_*functions. Fully backwards-compatible — no existing arguments removed or renamed.See full details below.
Test Plan
python -m pytest test_autolens/ -x)Full API Changes (for automation & release notes)
Added (new optional parameter — backwards-compatible)
autolens/imaging/plot/fit_imaging_plots.pysubplot_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.pysubplot_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.pysubplot_tracer(..., title_prefix=None)subplot_lensed_images(..., title_prefix=None)subplot_galaxies_images(..., title_prefix=None)autolens/point/plot/fit_point_plots.pysubplot_fit(..., title_prefix=None)autolens/point/plot/point_dataset_plots.pysubplot_dataset(..., title_prefix=None)Changed Behaviour (Plotter methods now forward title_prefix)
PlotterImaging,PlotterInterferometer,PlotterPoint, and the basePlotterinautolens/analysis/plotter.pynow passtitle_prefix=self.title_prefixwhen calling the above subplot functions.Migration
No migration needed — all changes are additive with
Nonedefaults.🤖 Generated with Claude Code