help-octave
[Top][All Lists]
Advanced

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

Re: plotting to a .ps file


From: Paul Laub
Subject: Re: plotting to a .ps file
Date: Thu, 28 Oct 2004 15:12:20 -0700

Dear Christian, 

Have you tried immediately following your replot command with 

    gset output

that is, sending gnuplot a "set output" command with no filename
argument? Doing so will close the file handle opened to (in your
example below) "foo.ps". See gnuplot documentation for details.

Also, you might try sending gnuplot commands to gnuplot using octave's graw(). 

Finally, typing "show terminal" and "show output" at the gnuplot (not
octave) prompt might provide some clues.

-- Paul 


On Thu, 28 Oct 2004 23:05:18 +0200, Christian T. Steigies
<address@hidden> wrote:
> Hi,
> I have problems to convince octave to plot it's output to a file. This used
> to work with replot, or with Dirk's replotps, which uses replot itself.
> 
> These lines, nearly a copy of the htmldocs, make it fail on my boxes:
> 
> x=linspace(0,2*pi,1000);
> plot(sin(x));
> gset term postscript
> gset output "foo.ps"
> replot
> 
> The postscript output appears in my terminal after the first gset command,
> some more after the second. When I capture this output, this looks like the
> ps file is supposed to be. The ps file sometimes contains valid ps code, but
> sometimes it is just a big file filled with zeros (ASCII zeros, so not
> readable by less and friends). There might be a difference wether I pass the
> m file to octave on the command line, or I start octave first. Or even when
> I start it inside emacs with ess. But probably I am just doing a stupid
> mistake and I can not see what is wrong, any ideas, corrections? I do not
> want to see the ps code in my terminal, I just want to see it in the file.
> And I want to see it all after I call replot, I could get some output with
> just one plot command, but the output from later plot commands is lost. This
> is a little difficult to describe, it does not seem very consistent, but I
> think this behaviour does not match the docs, so one of those two should be
> corrected.
> 
> This is on debian sarge i386 with octave 2.1.60-1 and gnuplot 4.0.0-2.
> 
> Christian
> 
> -------------------------------------------------------------
> 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
> -------------------------------------------------------------
> 
> 


-- 

Safe Harbor Disclaimer: "Elvis has left the building."



-------------------------------------------------------------
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
-------------------------------------------------------------



reply via email to

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