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",)