In my Jupyter Notebook I am plotting various xarrays as pcolormeshs via the some_xa.plot()
function. Now I want to plot them as a certain cmap, e.g. cmap = 'RdBu_r'
instead of the default 'viridis', without passing this to every single call for a plot.
In other words: How can I set cmap = 'RdBu_r'
as default for plotting xarrays in this Notebook?
I've tried to use the default of matplotlib:
plt.rcParams['figure.figsize'] = (20.0, 10.0)
plt.rcParams['image.cmap'] = ('RdBu_r')
While the figure size is changed for all plots, the cmap isn't influenced at all and presents 'viridis' every time, except I enter a value that is not recognized, resulting in a ValueError.