help-octave
[Top][All Lists]
Advanced

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

Re: image from matrix at original size [newbie]


From: marasolc
Subject: Re: image from matrix at original size [newbie]
Date: Mon, 2 Jan 2012 03:08:56 -0800 (PST)

Thank you very much guys,

though I still haven't solved the problem satisfactorily.
The code bellow is a slight modification of Ben's code:
---
map = jet();
colormap(map);

margin = 100;
freespace = 200;
width = 1024;
height = 256;
fwidth = width + 2*margin + freespace;
fheight = height + 2*margin;
fpos = [0 0 fwidth fheight];
apos = [margin/fwidth, margin/fheight, width/fwidth,  height/fheight];

figure ("position", fpos)
clf
image (rand (height, width), "cdatamapping", "scaled")
colorbar();
set (gca, "position", apos);
---

There are two problems:
1) The size of figure is absolutely resistant to the changes of /freespace/
variable. The size of axes is changed instead (Win7, gnuplot for displaying
the figures).
2) Colorbar is taken as a part of axes, so it seems to me that without
knowing the width of generated colorbar I cannot set properly the width of
axes in order to display matrix as matrix of coloured pixels.

Cheers, Marek




--
View this message in context: 
http://octave.1599824.n4.nabble.com/image-from-matrix-at-original-size-newbie-tp4234396p4252963.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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