#2 the shading also needed the check

This commit is contained in:
2026-03-12 22:45:29 +00:00
parent 42d7e30e7d
commit 54c5014faf

View File

@@ -154,11 +154,11 @@ plt.plot(x, y, 'b-', label='T distribution')
# Filter for which region to fill # Filter for which region to fill
coloredregion = x#default fill all 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 ) coloredregion = (x >= args.lowerbound) & ( x <= args.upperbound )
elif args.upperbound: elif args.upperbound is not None:
coloredregion = x <= args.upperbound coloredregion = x <= args.upperbound
elif args.lowerbound: elif args.lowerbound is not None:
coloredregion = x >= args.lowerbound coloredregion = x >= args.lowerbound
plt.fill_between(x, 0, y, where=coloredregion, color="grey", alpha=0.5, label="Design range",) plt.fill_between(x, 0, y, where=coloredregion, color="grey", alpha=0.5, label="Design range",)