Plotting#

PyAutoGalaxy custom visualization library.

Step-by-step Juypter notebook guides illustrating all objects listed on this page are provided on the autogalaxy_workspace: plot tutorials and it is strongly recommended you use those to learn plot customization.

Examples / Tutorials:

Plotters [aplt]#

Create figures and subplots showing quantities of standard PyAutoGalaxy objects.

Basic Plot Functions:

plot_array(array[, title, output_path, ...])

Plot an autoarray Array2D to file or onto an existing Axes.

plot_grid(grid[, title, output_path, ...])

Plot an autoarray Grid2D as a scatter plot.

Galaxy and Light / Mass Profile Subplots:

subplot_galaxy_light_profiles(galaxy, grid)

Create a subplot showing the image of every light profile in a galaxy.

subplot_galaxy_mass_profiles(galaxy, grid[, ...])

Create subplots showing lensing quantities for every mass profile in a galaxy.

subplot_basis_image(basis, grid[, ...])

Create a subplot showing the image of every light profile in a basis.

subplot_galaxies(galaxies, grid[, ...])

Create a standard five-panel summary subplot for a collection of galaxies.

subplot_galaxy_images(galaxies, grid[, ...])

Create a subplot showing the individual image of each galaxy.

subplot_adapt_images(...[, output_path, ...])

Create a subplot showing the adapt (model) image for each galaxy.

Imaging Fit Subplots:

subplot_fit_imaging(fit[, output_path, ...])

Create a six-panel subplot summarising a FitImaging.

subplot_fit_imaging_of_galaxy(fit, galaxy_index)

Create a three-panel subplot focused on a single galaxy contribution.

Interferometer Fit Subplots:

subplot_fit_interferometer(fit[, ...])

Create a three-panel subplot summarising a FitInterferometer.

subplot_fit_dirty_images(fit[, output_path, ...])

Create a six-panel subplot of dirty-image diagnostics for an interferometer fit.

subplot_fit_real_space(fit[, output_path, ...])

Create a real-space summary subplot for an interferometer fit.

Ellipse Fit Subplots:

subplot_fit_ellipse(fit_list[, output_path, ...])

Create a two-panel subplot summarising a list of ellipse fits.

subplot_ellipse_errors(fit_pdf_list[, ...])

Create a subplot showing the median ellipse and its uncertainty region from a PDF sample.

Non-linear Search Plot Functions [aplt]#

Module-level functions for visualizing non-linear search results.

corner_cornerpy(samples[, path, filename, ...])

corner_anesthetic(samples[, path, filename, ...])

subplot_parameters(samples[, use_log_y, ...])

log_likelihood_vs_iteration(samples[, ...])

Plot Customization [aplt]#

Customize figures created via Plotter objects, including changing matplotlib settings and adding visuals to figures.

Matplot Lib Wrappers [aplt]#

Wrappers for every matplotlib function used by a Plotter, allowing for detailed customization of every figure and subplot.

Matplotlib Wrapper Base Objects:

Matplotlib Wrapper 1D Objects:

Matplotlib Wrapper 2D Objects: