[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multiplot gnu under octave?
From: |
niles |
Subject: |
Re: multiplot gnu under octave? |
Date: |
Sun, 02 Apr 95 23:22:35 -0400 |
>#
>#Do you know if the "multiplot patch" will become part of standard gnuplot?
>#otherwise, maybe even this patch should be distributed with octave..
>#
>
>i think the multiiplot patch was to be integrated into main gnuplot
>distribution in the next (3.6) release. in fact, just a couple of
>minutes ago, i saw an announcement about beta release of 3.6 on the
>gnuplot newsgroup on usenet. so i suppose, the official relase of 3.6
>should be coming real soon now.
------------------------------------------------------------------------
[Note: 3/29/95: Beta testing for 3.6 is about to begin. You can obtain
a beta test version of gnuplot 3.6 via ftp to cmpc1.phys.soton.ac.uk]
------------------------------------------------------------------------
No the multiplot patch will not be added to Gnuplot 3.6. I pushed
real hard for it but support seems to just be starting up and they
want to release a maintance release (bug fixes, s/w decay) first.
It's been really slow, I really wouldn't hold my breath. (I've been
waiting for over a year now.)
>#
>#Could you give an FTP location of this patch?
>#
>
>multiplot patch is available at the official gnuplot (the dartmouth site) :
>ftp.dartmouth.edu
>and its mirrors. check the contrib directory or something. but you might check
>out the
>beta release of the 3.6 gnuplot, if you can stand the wrinckles of using beta
>release :-)
Yeah, it works OK it will lose your y-labels and other funnyness when
you print postscript... The interface is not real slick. The two
options for postscript multipage output is: 1) mpage (simple but does
the job most of the time) 2) gnuplot_eps (small awk script from
dartmouth, does a better job)
However! Neither of these two (mpage,gnuplot_eps) will work for
multiple lines AND multiple plots on the same page for ps output!
I've spend A LOT of time on this and without resorting to 'gplot' I
can't get it to work...
Real quick, mpage produces the postscript OK and I can view it with
'gs' in X-windows, but when trying to use 'gs' as a print filter for
my DeskJet it produces nothing! (gs or mpage bug???). I should point
out 'gs' works great for me on every other ps-file I run though it as
a printer filter. On the gnuplot_eps, the way I implemented the
'plot.m' command for Octave 1.1 I use 'hold' in gnuplot. Well each of
these held plots also end up in the output. For example say for Plot
#1 I want 3 lines. I really get plot #1 with the first line, plot #2
with 2 lines, and plot #3 (the only one I really wanted printed) with
the three lines. There is nothing wrong with gnuplot_eps, it's just
too simple to handle this case.
If anyone can figure a way around this write back! (Thanks)
Anyway here's my subplot.m for anyone who would like it:
-------------------
function subplot(mnp)
% SUBPLOT Create axes in tiled positions.
% SUBPLOT(m,n,p), or SUBPLOT(mnp), breaks the Figure window into
% an m-by-n matrix of small axes, selects the p-th axes for
% for the current plot, and returns the axis handle. The axes
% are counted along the top row of the Figure window, then the
% second row, etc. For example,
%
% SUBPLOT(2,1,1), PLOT(income)
% SUBPLOT(2,1,2), PLOT(outgo)
%
% plots income on the top half of the window and outgo on the
% bottom half.
%
% SUBPLOT(m,n,p), if the axis already exists, makes it current.
% SUBPLOT(H), where H is an axis handle, is another way of making
% an axis current for subsequent plotting commands.
%
% If a SUBPLOT specification causes a new axis to overlap an
% existing axis, the existing axis is deleted. For example,
% the statement SUBPLOT(1,1,1) deletes all existing smaller
% axes in the Figure window and creates a new full-figure axis.
% Octave version by Rick Niles.
m = fix(mnp/100);
n = fix((mnp-100*m)/10);
p = mnp-100*m-10*n;
if (p > m*n)
error('p must be less than m*n')
end
% This will make your margins a little better...
vmore = (m-1)/5;
hmore = (n-1)/20;
col = p;
row = 1;
while (col > n)
row = row + 1;
col = col - n;
end
sc = sprintf("set size %f, %f", ...
(1+hmore)*1/n,(1+vmore)*1/m);
oc = sprintf("set orgin %f,%f", ...
(1-hmore)*(col-1)/n,(1-hmore)*(m-row)/m);
eval(sc)
eval(oc)
end
------------------------------
Thanks,
Rick Niles.