I am plotting simulator results in matplotlib and would like to be able to have the x-axis changing color depending on a variable.
The variable is an indicator if, for each time step in the simulatorn, convergence is reached or not and how far away from convergence it is.
For the time steps where convergence is reached Id like to have the x-axis green and for non-convergence starting from light red for not so bad to red for bad. Now Im simply plotting a line along the x-axis which changes color as described but it would be nice to have the x-axis do it instead,
Is that possible?