Skip to content

Commit 3bd00e5

Browse files
committed
Refactor plotting module: remove MatPlot1D/2D, multi_plotters, subplot tracking
- Remove MatPlot1D, MatPlot2D container objects entirely - Remove multi_plotters.py (MultiFigurePlotter, MultiYX1DPlotter) - Remove mat_wrap.yaml, mat_wrap_1d.yaml, mat_wrap_2d.yaml config files - Remove mat_plot/ module (abstract.py, one_d.py, two_d.py) - All wrapper defaults now hardcoded directly in wrapper classes - Only 6 user-configurable options kept in general.yaml under mat_plot: section - AbstractPlotter holds output, cmap, use_log10, title directly (no MatPlot objects) - subplot_dataset(), subplot_fit() etc. rewritten as explicit matplotlib using plt.subplots() - figure_* methods accept optional ax parameter for subplot panel reuse - Remove is_for_subplot attribute and set_for_subplot() from all wrappers - Update all tests to match new hardcoded defaults and remove is_for_subplot test cases https://claude.ai/code/session_01B9sVEV54XWCa2LJw1C8gvv
1 parent 896f752 commit 3bd00e5

File tree

77 files changed

+3289
-5159
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+3289
-5159
lines changed
Lines changed: 30 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
general:
2-
backend: default # The matploblib backend used for visualization. `default` uses the system default, can specifiy specific backend (e.g. TKAgg, Qt5Agg, WXAgg).
3-
imshow_origin: upper # The `origin` input of `imshow`, determining if pixel values are ascending or descending on the y-axis.
4-
log10_min_value: 1.0e-4 # If negative values are being plotted on a log10 scale, values below this value are rounded up to it (e.g. to remove negative values).
5-
log10_max_value: 1.0e99 # If positive values are being plotted on a log10 scale, values above this value are rounded down to it (e.g. to prevent white blobs).
6-
zoom_around_mask: true # If True, plots of data structures with a mask automatically zoom in the masked region.
7-
inversion:
8-
reconstruction_vmax_factor: 0.5
9-
total_mappings_pixels : 8 # The number of source pixels used when plotting the subplot_mappings of a pixelization.
10-
zoom:
11-
plane_percent: 0.01
12-
inversion_percent: 0.01 # Plots of an Inversion's reconstruction use the reconstructed data's bright value multiplied by this factor.
13-
subplot_shape: # The shape of a subplots for figures with an input number of subplots (e.g. for a figure with 4 subplots, the shape is (2, 2)).
14-
1: (1, 1) # The shape of subplots for a figure with 1 subplot.
15-
2: (1, 2) # The shape of subplots for a figure with 2 subplots.
16-
4: (2, 2) # The shape of subplots for a figure with 4 (or less than the above value) of subplots.
17-
6: (2, 3) # The shape of subplots for a figure with 6 (or less than the above value) of subplots.
18-
9: (3, 3) # The shape of subplots for a figure with 9 (or less than the above value) of subplots.
19-
12: (3, 4) # The shape of subplots for a figure with 12 (or less than the above value) of subplots.
20-
16: (4, 4) # The shape of subplots for a figure with 16 (or less than the above value) of subplots.
21-
20: (4, 5) # The shape of subplots for a figure with 20 (or less than the above value) of subplots.
22-
36: (6, 6) # The shape of subplots for a figure with 36 (or less than the above value) of subplots.
23-
subplot_shape_to_figsize_factor: (6, 6) # The factors by which the subplot_shape is multiplied to determine the figsize of a subplot (e.g. if the subplot_shape is (2,2), the figsize will be (2*6, 2*6).
24-
units:
25-
use_scaled: true # Whether to plot spatial coordinates in scaled units computed via the pixel_scale (e.g. arc-seconds) or pixel units by default.
26-
cb_unit: $\,\,\mathrm{e^{-}}\,\mathrm{s^{-1}}$ # The string or latex unit label used for the colorbar of the image, for example electrons per second.
27-
scaled_symbol: '"' # The symbol used when plotting spatial coordinates computed via the pixel_scale (e.g. for Astronomy data this is arc-seconds).
28-
unscaled_symbol: pix # The symbol used when plotting spatial coordinates in unscaled pixel units.
1+
general:
2+
backend: default # The matplotlib backend used for visualization. `default` uses the system default, can specify specific backend (e.g. TKAgg, Qt5Agg, WXAgg).
3+
imshow_origin: upper # The `origin` input of `imshow`, determining if pixel values are ascending or descending on the y-axis.
4+
log10_min_value: 1.0e-4 # If negative values are being plotted on a log10 scale, values below this value are rounded up to it (e.g. to remove negative values).
5+
log10_max_value: 1.0e99 # If positive values are being plotted on a log10 scale, values above this value are rounded down to it.
6+
zoom_around_mask: true # If True, plots of data structures with a mask automatically zoom in the masked region.
7+
inversion:
8+
reconstruction_vmax_factor: 0.5
9+
total_mappings_pixels: 8 # The number of source pixels used when plotting the subplot_mappings of a pixelization.
10+
zoom:
11+
plane_percent: 0.01
12+
inversion_percent: 0.01 # Plots of an Inversion's reconstruction use the reconstructed data's bright value multiplied by this factor.
13+
units:
14+
use_scaled: true # Whether to plot spatial coordinates in scaled units computed via the pixel_scale (e.g. arc-seconds) or pixel units by default.
15+
cb_unit: $\,\,\mathrm{e^{-}}\,\mathrm{s^{-1}}$ # The string or latex unit label used for the colorbar of the image, for example electrons per second.
16+
scaled_symbol: '"' # The symbol used when plotting spatial coordinates computed via the pixel_scale (e.g. for Astronomy data this is arc-seconds).
17+
unscaled_symbol: pix # The symbol used when plotting spatial coordinates in unscaled pixel units.
18+
mat_plot:
19+
figure:
20+
figsize: (7, 7) # Default figure size. Override via aplt.Figure(figsize=(...)).
21+
yticks:
22+
fontsize: 22 # Default y-tick font size. Override via aplt.YTicks(fontsize=...).
23+
xticks:
24+
fontsize: 22 # Default x-tick font size. Override via aplt.XTicks(fontsize=...).
25+
title:
26+
fontsize: 24 # Default title font size. Override via aplt.Title(fontsize=...).
27+
ylabel:
28+
fontsize: 16 # Default y-label font size. Override via aplt.YLabel(fontsize=...).
29+
xlabel:
30+
fontsize: 16 # Default x-label font size. Override via aplt.XLabel(fontsize=...).

autoarray/config/visualize/mat_wrap.yaml

Lines changed: 0 additions & 124 deletions
This file was deleted.

autoarray/config/visualize/mat_wrap_1d.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)