From help-request at octave dot org Tue Jan 4 11:07:18 2005 Subject: Re: Plotting many images on one figure From: Jonathan Stickel To: help at octave dot org Date: Tue, 04 Jan 2005 09:09:01 -0800 Once, you have the saved image files, you could use the "montage" command of ImageMagick. Probably not exactly what you want since it requires work external to Octave, but I think it will give the desired result. Jonathan Daniel Déchelotte wrote: > 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, ------------------------------------------------------------- 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 -------------------------------------------------------------