help-octave
[Top][All Lists]
Advanced

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

Re: imagesc and scaled matrix


From: Martin Helm
Subject: Re: imagesc and scaled matrix
Date: Sun, 6 Nov 2011 16:00:05 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.7-desktop; KDE/4.6.0; x86_64; ; )

Am Sonntag, 6. November 2011, 15:22:20 schrieben Sie:
> OK. So I try :
> 
> X = rand(100,100).*(2^14);
> size(X);
> hB = imagesc(X);
> colorbar
> 
> B=get(hB);
> MyImage=B.cdata;
> 
> saveimage("test.ppm", B.cdata,"ppm");  # save image to file
> 
> MyImage is a copy of X. It is not scaled matrix.
> 

Sorry that I did not explicitely tell you that. I just pointed you to the info 
that the return value has changed. 
You are right that the cdata is just the matrix you passed and the point is 
that the whole scaling is delegated to the graphics backend by setting the 
property cdatamapping to "scaled".

> Where is scaled matrix ?
> (or how I can make it ?)
> 
How to access the scaled version of the matrix I honestly do not know. Maybe 
someone who is more familiar with the graphic system.

What you can easily get is to what the max and min values are mapped with 
caxis.


reply via email to

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