"""Python 3.14; numpy 2.3; matplotlib 3.10. Output is written to the current directory.""" from pathlib import Path import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt fig,ax=plt.subplots(figsize=(7,4),layout='constrained',facecolor='white') r=1.2 for sign in [-1,1]: q=np.linspace(.035,4.2,900);v=np.sqrt((q+1/q)/2) ax.plot(sign*q,v,color='#1767a3',lw=2,label='threshold' if sign==1 else None) ax.fill_between(sign*q,v,r,where=v