mirror of
https://github.com/Findus23/halo_comparison.git
synced 2024-09-19 16:03:50 +02:00
more plot improvements
This commit is contained in:
parent
fe336969a3
commit
80da2d8c53
2 changed files with 6 additions and 2 deletions
|
@ -103,7 +103,7 @@ def plot_comparison_hist2d(ax: Axes, file: Path, property: str):
|
||||||
rows.append(row)
|
rows.append(row)
|
||||||
df = pd.concat(rows, axis=1).T
|
df = pd.concat(rows, axis=1).T
|
||||||
print(df)
|
print(df)
|
||||||
if property in ["Mvir","Vmax"]:
|
if property in ["Mvir", "Vmax"]:
|
||||||
percentiles = []
|
percentiles = []
|
||||||
for rep_row in range(num_bins):
|
for rep_row in range(num_bins):
|
||||||
rep_x_left = bins[rep_row]
|
rep_x_left = bins[rep_row]
|
||||||
|
@ -209,13 +209,16 @@ comparisons = [(256, 512), (256, 1024)] # , (512, 1024)
|
||||||
|
|
||||||
def compare_property(property, show: bool):
|
def compare_property(property, show: bool):
|
||||||
is_hist_property = property in hist_properties
|
is_hist_property = property in hist_properties
|
||||||
|
height_to_width = 3 / 4
|
||||||
|
if property == "distance":
|
||||||
|
height_to_width /= 2
|
||||||
fig: Figure
|
fig: Figure
|
||||||
fig, axes = plt.subplots(
|
fig, axes = plt.subplots(
|
||||||
len(waveforms),
|
len(waveforms),
|
||||||
len(comparisons),
|
len(comparisons),
|
||||||
sharey="all",
|
sharey="all",
|
||||||
sharex="all",
|
sharex="all",
|
||||||
figsize=figsize_from_page_fraction(columns=2),
|
figsize=figsize_from_page_fraction(columns=2, height_to_width=height_to_width),
|
||||||
)
|
)
|
||||||
for i, waveform in enumerate(waveforms):
|
for i, waveform in enumerate(waveforms):
|
||||||
for j, (ref_res, comp_res) in enumerate(comparisons):
|
for j, (ref_res, comp_res) in enumerate(comparisons):
|
||||||
|
|
1
utils.py
1
utils.py
|
@ -87,6 +87,7 @@ def rowcolumn_labels(axes, labels, isrow: bool, pad=5) -> None:
|
||||||
size="medium",
|
size="medium",
|
||||||
ha=ha,
|
ha=ha,
|
||||||
va=va,
|
va=va,
|
||||||
|
rotation=90
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue