Skip to content

Commit

Permalink
added Q2min, Q2max to plot kincov with fixed y_lim
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescoMerlotti committed Jul 15, 2024
1 parent 44b97d9 commit 957a992
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions validphys2/src/validphys/dataplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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

0 comments on commit 957a992

Please sign in to comment.