diff --git a/cara/montecarlo.py b/cara/montecarlo.py index e5252769..eb6efb87 100644 --- a/cara/montecarlo.py +++ b/cara/montecarlo.py @@ -1117,7 +1117,7 @@ def print_qd_info(model: MCExposureModel) -> None: def compare_viruses_qr(violins: bool = True) -> None: # A list of 7 colors corresponding to each of the boxes # Represented as tuples of three numbers on the interval [0, 1] (e.g. (1, 0, 0)) (R, G, B) - colors = [(0, 0.5, 0), (0, 0, 0.5), (0.5, 0, 0)] + [(x, x, x) for x in np.linspace(0.1, 0.5, 4)[::-1]] + colors = [(0, 0.5, 0), (0, 0, 0.5), (0.5, 0, 0)] + [(x, x, x) for x in np.linspace(0.5, 0.9, 4)[::-1]] pastels = [x for x in colors[:3]] # The colors of the borders surrounding the violin plots @@ -1177,14 +1177,14 @@ def compare_viruses_qr(violins: bool = True) -> None: ax.hlines(y=[np.log10(970)], linestyles=['dashed'], colors=['red'], xmin=0, xmax=4) handles = [patches.Patch(color=c, label=l) for c, l in zip([p + (0.3,) for p in pastels], ('Breathing', 'Speaking', 'Shouting'))] - handles += [mlines.Line2D([], [], linestyle='dashed', color='red', label='S V Chorale (qR=970)')] - plt.legend(handles=handles, loc='lower left', bbox_to_anchor=(0.2, 0.03)) + handles += [mlines.Line2D([], [], linestyle='dashed', color='red', label='S V Chorale\n(qR=970)')] + plt.legend(handles=handles, loc='lower left', bbox_to_anchor=(0.12, 0.01)) ax.set_yticks([i for i in range(-6, 7, 2)]) ax.set_yticklabels(['$10^{' + str(i) + '}$' for i in range(-6, 7, 2)]) - plt.suptitle('SUPTITLE HERE') - ax.set_xlabel('XLABEL HERE') - ax.set_ylabel('YLABEL HERE') + plt.suptitle('Quantum generation rates using\nWells-Riley infection model', y=0.92, fontsize=12) + ax.set_xlabel('Respiratory Viruses', fontsize=12) + ax.set_ylabel('Quantum generation rate (q h$^{-1}$)', fontsize=12) plt.tight_layout() plt.show()