I wonder if it is possible to obscure the background of a typical matplotlib graph according to the displayed data.
For simplicity, letβs say, we have:
x=arange(1,5,0.01) y=sin(x) plot(x,y)
Is it possible to darken the background of the axes based on the y value?
Shading can be achieved by passing an array containing x and y to imshow, for example:
imshow(array, cmap='hot')
although I want to have a line graph of x and y on top of this imshow figure.
Is it possible?
source share