Skip to content

Commit bae6b32

Browse files
committed
Update plot_mag_color_1d_hist.py
1 parent 7fd95fe commit bae6b32

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

diffhtwo/experimental/diagnostics/plot_mag_color_1d_hist.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -423,13 +423,12 @@ def plot_n(
423423
]
424424
)
425425

426+
color_bin_edges = np.arange(-0.5 - dmag / 2, 2.0, dmag)
427+
mag_bin_edges = np.arange(18.0 - dmag / 2, mag_thresh, dmag)
428+
426429
# Plot corner
427-
ranges = ranges = [
428-
(obs_colors_mag1[:, i].min(), obs_colors_mag1[:, i].max())
429-
for i in range(len(dimension_labels))
430-
]
431-
ranges[-1] = (18, mag_thresh)
432-
# [(-1, 2.5), (-1, 2.5), (-0.5, 1.5), (-0.5, 1.5), (18, mag_thresh)]
430+
ranges = [(color_bin_edges[0], color_bin_edges[-1])] * (len(dimension_labels) - 1)
431+
ranges.append((mag_bin_edges[0], mag_bin_edges[-1]))
433432
fig_corner = corner.corner(
434433
obs_colors_mag1,
435434
weights=N_weights1,
@@ -515,9 +514,6 @@ def plot_n(
515514
fig.subplots_adjust(left=0.1, hspace=0, top=0.8, right=0.99, bottom=0.2, wspace=0.0)
516515
fig.suptitle(title)
517516

518-
color_bin_edges = np.arange(-0.5 - dmag / 2, 2.0, dmag)
519-
mag_bin_edges = np.arange(18.0 - dmag / 2, mag_thresh, dmag)
520-
521517
for i in range(0, n_bands):
522518
if i == n_bands - 1:
523519
bins = mag_bin_edges

0 commit comments

Comments
 (0)