I\'d like to fill the area under some curve between two values on the horizontal axis only. I tried
import matplotlib.pyplot as plt import numpy as np from s
This error occurred because
x > -3 and x < -2
is an ambiguous numpy expression, so it raises the error. Instead you want
(x > -3) & (x < -2)
Other options are to use logical_and or bitwise_and (or even * should work).
*