I am trying to plot a set of data using the code:
data=xlsread('test_stress.xls');imagesc(data');%colormap([0 0 1; 1 0 0]); %blue; red
ax = gca;ax.YTickLabel = {'7','10','36','46','54', '62', '63', '71', '82', '84', '90'};colormap(bluewhitered(256)), colorbar
Now I am getting, as expected, a plot based on colour gradient. However what I want is that irrespective of the values, just based on the sign there should be a plot, i.e. whenever it is positive, it will be red and whenever negative, it should be blue. And zero gives white. How do I go about it?
Best Answer