Adding a title to colobar in Matlab

To insert a title to the colorbar in matlab.  Use the following code(Source):

load mandrill % Loads a data for the example
image(X) % Plots an image for the example
t=colorbar;% Inserts a colorbar. a handle is created
set(get(t,'ylabel'),'string','My colorbar title','Fontsize',10) % sets the ylabel property of the handle t.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>