From 80da2d8c535429d96aec394895b2131e95204c16 Mon Sep 17 00:00:00 2001 From: Lukas Winkler Date: Thu, 18 Aug 2022 12:35:31 +0200 Subject: [PATCH] more plot improvements --- comparison_plot.py | 7 +++++-- utils.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/comparison_plot.py b/comparison_plot.py index b3cfa20..718cd06 100644 --- a/comparison_plot.py +++ b/comparison_plot.py @@ -103,7 +103,7 @@ def plot_comparison_hist2d(ax: Axes, file: Path, property: str): rows.append(row) df = pd.concat(rows, axis=1).T print(df) - if property in ["Mvir","Vmax"]: + if property in ["Mvir", "Vmax"]: percentiles = [] for rep_row in range(num_bins): rep_x_left = bins[rep_row] @@ -209,13 +209,16 @@ comparisons = [(256, 512), (256, 1024)] # , (512, 1024) def compare_property(property, show: bool): is_hist_property = property in hist_properties + height_to_width = 3 / 4 + if property == "distance": + height_to_width /= 2 fig: Figure fig, axes = plt.subplots( len(waveforms), len(comparisons), sharey="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 j, (ref_res, comp_res) in enumerate(comparisons): diff --git a/utils.py b/utils.py index 3f34bba..70e9981 100644 --- a/utils.py +++ b/utils.py @@ -87,6 +87,7 @@ def rowcolumn_labels(axes, labels, isrow: bool, pad=5) -> None: size="medium", ha=ha, va=va, + rotation=90 )