I'd like to overide the axes.prop_cycle
defined in a matplotlib stylesheet that I'm using matplotlib.pyplot.rcParams
to avoid needing to use matplotlib.pyplot.gca().set_prop_cycle(None)
during each call to the plots I'm creating which is suggested in this SO answer.
Based on the docs I'm using somethings like this:
import matplotlib.pyplot as plt
plt.style.use('my_custom_stylesheet')
plt.rcParams['axes.prop_cycle'] = plt.cycler('color', ['']) # Equivalent of plt.gca().set_prop_cycle(None)
However I'm unable to return the axes.prop_cycle
to return to its default. Is this possible without having to explicitly ['k, b, r, ...'] list all of the colors that I'd like to use?