I'm trying to color the area between 2 fitted curves that I've plotted. Here is my code, though I can't include the data I'm using:
import numpy as np
import matplotlib.pyplot as plt
xp = np.linspace(-6.0, 0.0)
bestfitup = np.poly1d(np.polyfit(x, y, 9))
bestfitdown = np.poly1d(np.polyfit(xdata, ydata, 9))
plt.fill_between(xp,bestfitup, bestfitdown ,color='#539ecd')
However I get the following error:
ERROR: operands could not be broadcast together with shapes (50,) (10,)