When using pcolormesh
, I need to set the color range, so I use
norm=[mcolors.BoundaryNorm(np.arange(-0.3,0.6+0.1,0.1), ncolors=plt.cm.RdBu_r.N, extend='both')]
.
However I aslo want to set norm = mcolors.TwoSlopeNorm(vcenter=0)
. How can I set these two attributes in pcolormesh
at the same time?
I do not fully understand the question. ScalarMappable
objects have exactly 1 norm both conceptually and at the code level.
What are you trying to do that you want to set two norms?