From 09759a211269f4300b83b4c97a9214d34226f910 Mon Sep 17 00:00:00 2001 From: Francesco Merlotti Date: Wed, 19 Jun 2024 17:33:29 +0100 Subject: [PATCH] added Q2min, Q2max to plot kincov with fixed y_lim --- validphys2/src/validphys/dataplots.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/validphys2/src/validphys/dataplots.py b/validphys2/src/validphys/dataplots.py index af2e7b657..f3c8eba12 100644 --- a/validphys2/src/validphys/dataplots.py +++ b/validphys2/src/validphys/dataplots.py @@ -1066,6 +1066,8 @@ def plot_xq2( dataset_inputs_by_groups_xq2map, use_cuts, data_input, + Q2min=None, + Q2max=None, display_cuts:bool=True, marker_by:str='process type', highlight_label:str='highlight', @@ -1300,4 +1302,13 @@ def next_options(): ax.set_ylabel(r'$Q^2$ (GeV$^2$)') ax.set_xscale('log') ax.set_yscale('log') + + _, curr_Q2max = ax.get_ylim() + if Q2min: + ax.set_ylim(Q2min, curr_Q2max) + + curr_Q2min, _ = ax.get_ylim() + if Q2max: + ax.set_ylim(curr_Q2min, Q2max) + return fig