Can I specify a particular matrix for the colorbar?
Ältere Kommentare anzeigen
I'd like to create a map using one particular matrix of data (log-transformed), but make the colorbar from a different matrix data (un-transformed). Is this possible? Can I specify for the colorbar to pull info from a matrix that wasn't used for the map?
Akzeptierte Antwort
Weitere Antworten (2)
Sean de Wolski
am 10 Sep. 2013
0 Stimmen
It is possible to do what you want by adjusting the 'CData' properties of the various graphics objects and the 'YLim' property of the colorbar.
Kelly Kearney
am 17 Sep. 2013
You've accepted an answer, but I'm not sure you've actually solved your problem. If I'm guessing correctly, you aren't really looking for a different colormap... you just want to label the colorbar with the more human-readable value. Is this the sort of thing you're looking for?
pcolor(log10(z)); % z is your chlorophyll data
cb = colorbar;
tk = [0.01 0.1 1 10 50]';
set(cb, 'ytick', log10(tk), 'yticklabel', num2str(tk));
1 Kommentar
Maureen
am 25 Sep. 2013
Kategorien
Mehr zu Color and Styling finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!