From 28a8b43c774955e351ae8092bdf7f3a82b0e087f Mon Sep 17 00:00:00 2001 From: markus Date: Tue, 23 Feb 2021 17:51:39 +0100 Subject: [PATCH] update x-range --- cara/montecarlo.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index 591d3883..ed07bf2d 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -669,11 +669,12 @@ def composite_plot_pi_vs_viral_load(baselines: typing.List[MCExposureModel], lab axs[0, i + 2].set_xticklabels([]) axs[0, i + 2].set_xlabel(f"{np.round(np.mean(data) * 100, 1)}%") - axs[1, 0].hist(baselines[0].concentration_model.infected._generate_viral_loads(), bins=30, range=(1, 12)) + axs[1, 0].hist(baselines[0].concentration_model.infected._generate_viral_loads(), bins=30, range=(2, 12)) axs[1, 0].set_yticks([]) axs[1, 0].set_yticklabels([]) - axs[1, 0].set_xticks([i for i in range(1, 13, 2)]) - axs[1, 0].set_xticklabels(['$10^{' + str(i) + '}$' for i in range(1, 13, 2)]) + axs[1, 0].set_xticks([i for i in range(2, 13, 2)]) + axs[1, 0].set_xticklabels(['$10^{' + str(i) + '}$' for i in range(2, 13, 2)]) + axs[1, 0].set_xlim(2, 12) axs[1, 0].set_xlabel('Viral load') axs[0, 0].set_ylabel('Probability of infection') plt.suptitle(title)