From 54c5014faf2f39bab16e03e480c9ef0c6767ffbe Mon Sep 17 00:00:00 2001 From: Joseph Timothy Foley Date: Thu, 12 Mar 2026 22:45:29 +0000 Subject: [PATCH] #2 the shading also needed the check --- infocalc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/infocalc.py b/infocalc.py index c0668c0..4b74787 100755 --- a/infocalc.py +++ b/infocalc.py @@ -154,11 +154,11 @@ plt.plot(x, y, 'b-', label='T distribution') # Filter for which region to fill coloredregion = x#default fill all -if args.lowerbound and args.upperbound: +if args.lowerbound is not None and args.upperbound is not None: coloredregion = (x >= args.lowerbound) & ( x <= args.upperbound ) -elif args.upperbound: +elif args.upperbound is not None: coloredregion = x <= args.upperbound -elif args.lowerbound: +elif args.lowerbound is not None: coloredregion = x >= args.lowerbound plt.fill_between(x, 0, y, where=coloredregion, color="grey", alpha=0.5, label="Design range",)