Ideally, you'd want to set up a list of y values for each co-ordinate in the red area. Then you'd want to check every data point y co-ordinate of the curve with x co-ordinate between red area Xmin <= x <= red area X max. If all the data point y coordinates are in the list, then you know the curve is inside the red area, if one of the data point y coordinates isn't, then you know that some of the curve is outside of the red area.
red_area_yvals = [y1, y2, y3, y4, y5, ...]
red_area_xmin = x1
red_area_xmax = xmax
curvecoordinates = [[a1,b1],[a2,b2],....]
check=True
for coord in curvecoordinates:
if coord[0] >= red_area_xmin and coord[0] <= red_area_xmax:
if coord[1] in red_area_yvals:
continue
else:
check=False
break
if check:
print("fully in")
else:
print("not fully in")
edit: if the red area was a perfect rectangle this would work, for a more complex red area I would think about checking both combination of x and y rather than just y.
2nd edit: There is probably a way of doing this with integration (i.e areas under the curve, taking away the area from under bottom of the red area to y=0 then doing the same for above the curve and comparing the two) but that is beyond my mathematical ability and in Python for complex curves.