#2 the shading also needed the check
This commit is contained in:
@@ -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",)
|
||||
|
||||
Reference in New Issue
Block a user