From 8399500025f042c0f3db3d3cc2a1c1c02272cd22 Mon Sep 17 00:00:00 2001 From: James Nightingale Date: Mon, 4 Nov 2024 18:28:16 +0000 Subject: [PATCH] fix plotter --- autolens/imaging/plot/fit_imaging_plotters.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/autolens/imaging/plot/fit_imaging_plotters.py b/autolens/imaging/plot/fit_imaging_plotters.py index ebafa3949..f9519acf4 100644 --- a/autolens/imaging/plot/fit_imaging_plotters.py +++ b/autolens/imaging/plot/fit_imaging_plotters.py @@ -293,6 +293,14 @@ def figures_2d_of_planes( elif self.tracer.planes[plane_index].has(cls=aa.Pixelization): + pix = self.tracer.planes[plane_index].cls_list_from(cls=aa.Pixelization)[0] + + if isinstance(pix.mesh, aa.mesh.Delaunay): + try: + self.mat_plot_2d.cmap.kwargs.pop("vmax") + except KeyError: + pass + inversion_plotter = self.inversion_plotter_of_plane( plane_index=plane_index ) @@ -304,6 +312,12 @@ def figures_2d_of_planes( interpolate_to_uniform=interpolate_to_uniform ) + if use_source_vmax: + try: + self.mat_plot_2d.cmap.kwargs.pop("vmax") + except KeyError: + pass + if plane_errors: if self.tracer.planes[plane_index].has(cls=aa.Pixelization): @@ -334,9 +348,6 @@ def figures_2d_of_planes( interpolate_to_uniform=interpolate_to_uniform ) - if use_source_vmax: - self.mat_plot_2d.cmap.kwargs.pop("vmax") - def subplot_of_planes(self, plane_index: Optional[int] = None): """ Plots images representing each individual `Plane` in the plotter's `Tracer` in 2D on a subplot, which are