I'm trying to get access to the shaded region of a matplotlib plot, so that I can remove it without doing plt.cla()
[since cla()
clears the whole axis including axis label too]
If I were plotting I line, I could do:
import matplotlib.pyplot as plt
ax = plt.gca()
ax.plot(x,y)
ax.set_xlabel('My Label Here')
# then to remove the line, but not the axis label
ax.lines.pop()
However, for plotting a region I execute:
ax.fill_between(x, 0, y)
So ax.lines
is empty.
How can I clear this shaded region please?