Не могу закрасить область между функциями на графике python
Не могу закрасить область между 7 функциями. но выводит ошибку
TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Функции строила так:
fig, ax = plt.subplots()
ax.set_xlabel('x1')
ax.set_ylabel('x2')
x = np.linspace(0, 35)
y = 16 - x
ax.plot(x, y)
x = np.linspace(0, 35)
y = x/2 - 4
ax.plot(x, y)
x = np.linspace(0, 35)
y = 3*x/2 + 8
ax.plot(x, y)
x = np.linspace(0, 35)
y = 3*x - 16
ax.plot(x, y)
x = np.linspace(0, 35)
y = 1/3 * x + 16
ax.plot(x, y)
plt.fill_between(x, y,
where=((y>=16-x) & (y>=x/2 - 4) & (y<=3/2 * x +8) & (y>=3*x-16) & (1/3 * x +16)),
color='red'
)