Geometric figure

Helo guys,I wanna create a geometric figure using functions given at intervals

import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(-20, 20, 500, False)
a = np.abs(x-4)*(x<=0)
b = np.sqrt(-x+16)*(x>=0)*(x<16)
plt.plot(x, a, x, b)

How do I hide paths which are out of intervals?

Make a and b masked arrays, with masked points outside the desired interval.