|
8 | 8 |
|
9 | 9 | from autogalaxy.plot.plot_utils import plot_array |
10 | 10 | from autoarray.plot.array import _zoom_array_2d |
11 | | -from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize |
| 11 | +from autoarray.plot.utils import save_figure, hide_unused_axes, conf_subplot_figsize, tight_layout |
12 | 12 | from autoarray.plot.utils import numpy_lines as _to_lines |
13 | 13 | from autoarray.inversion.mappers.abstract import Mapper |
14 | 14 | from autoarray.inversion.plot.mapper_plots import plot_mapper |
@@ -320,7 +320,7 @@ def subplot_fit( |
320 | 320 | vmax=source_vmax) |
321 | 321 |
|
322 | 322 | hide_unused_axes(axes_flat) |
323 | | - plt.tight_layout() |
| 323 | + tight_layout() |
324 | 324 | save_figure(fig, path=output_path, filename=f"fit{plane_index_tag}", format=output_format) |
325 | 325 |
|
326 | 326 |
|
@@ -384,7 +384,7 @@ def subplot_fit_x1_plane( |
384 | 384 | plot_array(array=norm_resid, ax=axes_flat[5], title="Normalized Residual Map", |
385 | 385 | colormap=colormap, vmin=-_abs_max, vmax=_abs_max, cb_unit=r"$\sigma$") |
386 | 386 |
|
387 | | - plt.tight_layout() |
| 387 | + tight_layout() |
388 | 388 | save_figure(fig, path=output_path, filename="fit_x1_plane", format=output_format) |
389 | 389 |
|
390 | 390 |
|
@@ -508,7 +508,7 @@ def subplot_fit_log10( |
508 | 508 | lines=source_plane_lines, line_colors=source_plane_line_colors, |
509 | 509 | vmax=source_vmax) |
510 | 510 |
|
511 | | - plt.tight_layout() |
| 511 | + tight_layout() |
512 | 512 | save_figure(fig, path=output_path, filename=f"fit_log10{plane_index_tag}", format=output_format) |
513 | 513 |
|
514 | 514 |
|
@@ -569,7 +569,7 @@ def subplot_fit_log10_x1_plane( |
569 | 569 | plot_array(array=fit.chi_squared_map, ax=axes_flat[5], title="Chi-Squared Map", |
570 | 570 | colormap=colormap, use_log10=True, cb_unit=r"$\chi^2$") |
571 | 571 |
|
572 | | - plt.tight_layout() |
| 572 | + tight_layout() |
573 | 573 | save_figure(fig, path=output_path, filename="fit_log10", format=output_format) |
574 | 574 |
|
575 | 575 |
|
@@ -637,7 +637,7 @@ def subplot_of_planes( |
637 | 637 |
|
638 | 638 | _plot_source_plane(fit, axes_flat[3], pidx, colormap=colormap) |
639 | 639 |
|
640 | | - plt.tight_layout() |
| 640 | + tight_layout() |
641 | 641 | save_figure(fig, path=output_path, filename=f"fit_of_plane_{pidx}", format=output_format) |
642 | 642 |
|
643 | 643 |
|
@@ -762,7 +762,7 @@ def subplot_tracer_from_fit( |
762 | 762 | plot_array(array=magnification, ax=axes_flat[8], title="Magnification", |
763 | 763 | colormap=colormap) |
764 | 764 |
|
765 | | - plt.tight_layout() |
| 765 | + tight_layout() |
766 | 766 | save_figure(fig, path=output_path, filename="tracer", format=output_format) |
767 | 767 |
|
768 | 768 |
|
@@ -844,7 +844,7 @@ def subplot_fit_combined( |
844 | 844 | plot_array(array=fit.normalized_residual_map, ax=row_axes[5], |
845 | 845 | title="Normalized Residual Map", colormap=colormap, cb_unit=r"$\sigma$") |
846 | 846 |
|
847 | | - plt.tight_layout() |
| 847 | + tight_layout() |
848 | 848 | save_figure(fig, path=output_path, filename="fit_combined", format=output_format) |
849 | 849 |
|
850 | 850 |
|
@@ -920,7 +920,7 @@ def subplot_fit_combined_log10( |
920 | 920 | plot_array(array=fit.normalized_residual_map, ax=row_axes[5], |
921 | 921 | title="Normalized Residual Map", colormap=colormap, cb_unit=r"$\sigma$") |
922 | 922 |
|
923 | | - plt.tight_layout() |
| 923 | + tight_layout() |
924 | 924 | save_figure(fig, path=output_path, filename="fit_combined_log10", format=output_format) |
925 | 925 |
|
926 | 926 |
|
|
0 commit comments