Skip to content

Commit

Permalink
fix plotter
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammy2211 committed Nov 4, 2024
1 parent 0934168 commit 8399500
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions autolens/imaging/plot/fit_imaging_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand All @@ -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):
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8399500

Please sign in to comment.