From 184981c400ceeeefd58e36d3da2f0c38409700de Mon Sep 17 00:00:00 2001 From: Andrejh Date: Sun, 21 Feb 2021 16:08:03 +0100 Subject: [PATCH] Insert the PDF hist in the Pi vs vl plot --- cara/montecarlo.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cara/montecarlo.py b/cara/montecarlo.py index bac9e09c..752ef140 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -569,6 +569,15 @@ def plot_pi_vs_viral_load(baselines: typing.Union[MCExposureModel, typing.List[M plt.text(10.5, 0.80, '$vl_{crit2}$', fontsize=12,color='black') if labels is not None: plt.legend(labels) + # this is an inset plot inside the main plot + a = plt.axes([.2, .25, .25, .2], facecolor='k') + #TODO - Markus can you plot the hist using the chosen model instead of hardcoding + # in the 'exposure_model' str? + plt.hist(shared_office_model[1].infection_probability()/100, bins=200) + plt.title('PDF',fontsize=10) + plt.xticks([0,0.5,1]) + plt.yticks([]) + plt.show()