For Programmers: Free Programming Magazines  


Home > Archive > Matlab > August 2005 > Labeling colorbar









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Labeling colorbar
Chetan Patil

2005-08-31, 7:01 pm

Hello,
I frequently plot 2-D images where the corresponding colorbar values
have units that I would like to identify. (ie. after I plot an image
I do xlabel('millimeters'), ylabel('millimeters') ... but for the
colorscale, I am stuck labelling the units using gtext and then
rotating the object -90 deg). I have searched quite a bit in matlab
help and on the web, but am not able to find a function that
automatically labels the color axis. Am I missing an obvious command?
Thanks.
Jérôme

2005-08-31, 7:01 pm

Hi,

try this :

load clown
colormap(map)
imagesc(X);
axis image;
c=colorbar;

axes(c);
ylabel('aaaaaaaaaaaaaa')

Jérôme
Daniel Ennis

2005-08-31, 7:01 pm

It still needs refining, but you can try cbar.m on the file exchange:

<http://www.mathworks.com/matlabcent...objectType=FILE>

-Dan-
Chetan

2005-08-31, 7:01 pm

Jérôme,

Thank you very much for your help!!!!

-Chetan
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com