help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

colorbar for decimal images


From: Lorenzo Trojan
Subject: colorbar for decimal images
Date: Fri, 30 Oct 2009 11:54:58 +0000 (GMT)

Hi all,

sorry for asking this question, I've been looking around but I couldn't find a solution to this.

I have a matrix of intensities. The intensity of each pixel is a double number ranging from e-4 to e-3 and I'd like to produce an image using image() or imshow() and add a colorbar showing the correct range of values. I could do something like:

> minmat = min (min (matrix)) ;
> maxmat = max (max (matrix)) ;
> delmat = maxmat - minmat ;
> imgmat = (matrix + minmat) * 64 / delmat ;
> image (imgmat);
> colormat (hot (64)) ;
> colorbar ();

but then the colorbar would show the range from 1 to 64.

is there a way to change the labels to the colorbar so that it display the range of the original image limits? I tried to look for the axis object associated with the colorbar, but I could't find them...

Thanks,
Lorenzo


reply via email to

[Prev in Thread] Current Thread [Next in Thread]