[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Plotting many images on one figure
From: |
Daniel Déchelotte |
Subject: |
Plotting many images on one figure |
Date: |
Tue, 4 Jan 2005 16:40:09 +0100 |
Hi,
I would like to draw, say, a 10 by 10 grid of images, each of which is a 28
by 28 pixel, gray-level image. I couldn't get imshow() or image() to
display anything, I could only get saveimage generate a ppm image (PS seems
broken), and I can not see how I could arrange several of these images into
one figure.
Below:
"siz" is 28
"everything" is a [N, siz * siz] array (N = 100)
The following statement writes the first image in a ppm file:
saveimage("test.ppm", reshape(everything(1,:), siz, siz)',...
"ppm", colormap(gray(256)))
A Matlab(r) script I would like to port to octave:
nlines = 10;
ncolumns = 10;
for i=1:nlines * ncolumns,
subplot(nlines, ncolumns, i);
colormap(gray(256));
image(reshape(everything(i,:), siz, siz)');
end
I am afraid I already know the answer (not possible), but I wouldn't like
to miss a solution if one exists. I am running octave2.0.17-8 but could be
using octave2.1.60-1 if that helps, on Linux (Debian sarge).
Regards,
--
Daniel Déchelotte
http://yo.dan.free.fr/
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Plotting many images on one figure,
Daniel Déchelotte <=