[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Multi-page ps output (1-page output wanted)
From: |
Maciej Bliziński |
Subject: |
Multi-page ps output (1-page output wanted) |
Date: |
Sat, 7 May 2005 11:48:14 +0200 |
User-agent: |
Mutt/1.5.9i |
Hello,
I'd like to produce a set of 1-page postscript files. I've read
everything I could find. Here's my problem example:
-----------------------------------------------------------------
params = [ 0, 1; 1, 0.5; 2, 2; ]; % means and variances
x = -3:0.1:8;
for plotNo = 1:3
% When placed here, they produce 5 pages in each file
gset term postscript
fname = strcat("example_", int2str(plotNo), ".ps");
eval(sprintf("gset out \"%s\"", fname))
% calculations and plotting
tmpdata = randn(20,1) * sqrt(params(plotNo, 2)) + params(plotNo, 1);
tmpmean = mean(tmpdata);
tmpvar = var(tmpdata);
hist(tmpdata, -3:1:8, 1);
hold on;
plot(x, normal_pdf(x, tmpmean, tmpvar));
plot(x, normal_pdf(x, params(plotNo, 2), params(plotNo, 1)));
title(strcat("Normal distribution example no ", int2str(plotNo)));
hold off;
% When placed here, they produce 1 *empty* page
% gset term postscript
% fname = strcat("example_", int2str(plotNo), ".ps");
% eval(sprintf("gset out \"%s\"", fname))
replot
gset term x11
end
------------------------------------------------------------------
How to produce 1-page output files?
--
Maciej Bliziński <address@hidden>
Danmarks Tekniske Universitet http://www.dtu.dk
International guest student
-------------------------------------------------------------
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
-------------------------------------------------------------
- Multi-page ps output (1-page output wanted),
Maciej Bliziński <=