specific color in contourf
2 views (last 30 days)
Star Strider on 28 Apr 2015
You can choose amongst several colormap options, although not knowing your data range, I can’t suggest anything specific. There are several related topics in the documentation that apply, specifically Change Fill Colors for Contour Plot and several others, most notably colormap, that page links to.
Since a colormap is an (Nx3) matrix (you can choose N), you can also change the order with the circshift function. If you want to shift it down R rows, something like this works:
M = magic(4);
R = circshift(M, [2 0]);
to rotate ‘M’ down two rows. With colormap, it would shift the order of the colours. Another option if you want to completely invert the order is flipud.
Experiment! You can probably do what you want.