|
6 | 6 | import autogalaxy as ag |
7 | 7 |
|
8 | 8 | from autoarray.plot.plots.array import plot_array, _zoom_array_2d |
| 9 | +from autoarray.plot.plots.utils import save_figure |
9 | 10 | from autolens.plot.plot_utils import ( |
10 | 11 | _to_lines, |
11 | | - _save_subplot, |
12 | 12 | _critical_curves_from, |
13 | 13 | _caustics_from, |
14 | 14 | ) |
@@ -139,7 +139,7 @@ def subplot_fit( |
139 | 139 | colormap=colormap) |
140 | 140 |
|
141 | 141 | plt.tight_layout() |
142 | | - _save_subplot(fig, output_path, f"subplot_fit{plane_index_tag}", output_format) |
| 142 | + save_figure(fig, path=output_path, filename=f"subplot_fit{plane_index_tag}", format=output_format) |
143 | 143 |
|
144 | 144 |
|
145 | 145 | def subplot_fit_x1_plane( |
@@ -177,7 +177,7 @@ def subplot_fit_x1_plane( |
177 | 177 | colormap=colormap, vmin=-_abs_max, vmax=_abs_max) |
178 | 178 |
|
179 | 179 | plt.tight_layout() |
180 | | - _save_subplot(fig, output_path, "subplot_fit_x1_plane", output_format) |
| 180 | + save_figure(fig, path=output_path, filename="subplot_fit_x1_plane", format=output_format) |
181 | 181 |
|
182 | 182 |
|
183 | 183 | def subplot_fit_log10( |
@@ -260,7 +260,7 @@ def subplot_fit_log10( |
260 | 260 | colormap=colormap, use_log10=True) |
261 | 261 |
|
262 | 262 | plt.tight_layout() |
263 | | - _save_subplot(fig, output_path, f"subplot_fit_log10{plane_index_tag}", output_format) |
| 263 | + save_figure(fig, path=output_path, filename=f"subplot_fit_log10{plane_index_tag}", format=output_format) |
264 | 264 |
|
265 | 265 |
|
266 | 266 | def subplot_fit_log10_x1_plane( |
@@ -300,7 +300,7 @@ def subplot_fit_log10_x1_plane( |
300 | 300 | colormap=colormap, use_log10=True) |
301 | 301 |
|
302 | 302 | plt.tight_layout() |
303 | | - _save_subplot(fig, output_path, "subplot_fit_log10", output_format) |
| 303 | + save_figure(fig, path=output_path, filename="subplot_fit_log10", format=output_format) |
304 | 304 |
|
305 | 305 |
|
306 | 306 | def subplot_of_planes( |
@@ -339,7 +339,7 @@ def subplot_of_planes( |
339 | 339 | _plot_source_plane(fit, axes_flat[3], pidx, colormap=colormap) |
340 | 340 |
|
341 | 341 | plt.tight_layout() |
342 | | - _save_subplot(fig, output_path, f"subplot_of_plane_{pidx}", output_format) |
| 342 | + save_figure(fig, path=output_path, filename=f"subplot_of_plane_{pidx}", format=output_format) |
343 | 343 |
|
344 | 344 |
|
345 | 345 | def subplot_tracer_from_fit( |
@@ -389,7 +389,7 @@ def subplot_tracer_from_fit( |
389 | 389 | axes_flat[i].axis("off") |
390 | 390 |
|
391 | 391 | plt.tight_layout() |
392 | | - _save_subplot(fig, output_path, "subplot_tracer", output_format) |
| 392 | + save_figure(fig, path=output_path, filename="subplot_tracer", format=output_format) |
393 | 393 |
|
394 | 394 |
|
395 | 395 | def subplot_fit_combined( |
@@ -444,7 +444,7 @@ def subplot_fit_combined( |
444 | 444 | title="Normalized Residual Map", colormap=colormap) |
445 | 445 |
|
446 | 446 | plt.tight_layout() |
447 | | - _save_subplot(fig, output_path, "subplot_fit_combined", output_format) |
| 447 | + save_figure(fig, path=output_path, filename="subplot_fit_combined", format=output_format) |
448 | 448 |
|
449 | 449 |
|
450 | 450 | def subplot_fit_combined_log10( |
@@ -501,7 +501,7 @@ def subplot_fit_combined_log10( |
501 | 501 | title="Normalized Residual Map", colormap=colormap) |
502 | 502 |
|
503 | 503 | plt.tight_layout() |
504 | | - _save_subplot(fig, output_path, "fit_combined_log10", output_format) |
| 504 | + save_figure(fig, path=output_path, filename="fit_combined_log10", format=output_format) |
505 | 505 |
|
506 | 506 |
|
507 | 507 | def _symmetric_vmax(array) -> float: |
|
0 commit comments