Adding a title to colobar in Matlab

Posted on Sun 21 March 2010 in Misc

To insert a title to the colorbar in matlab. 

Use the following code (Source):

% Loads a data for the example 
load mandrill

% Plots an image for the example 

% Inserts a colorbar. a handle is created 

% sets the ylabel property of the handle t. 
set(get(t,'ylabel'),'string','My colorbar title','Fontsize',10)