how send output to postscript file?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how send output to postscript file?

Dr. G. Buerger-2
Hi octave,

simple question: how do I send my plots to a postscript file? - I knew how to do
it in gnuplot but I feel too tired to do this again.

        Gerd

Reply | Threaded
Open this post in threaded view
|

how send output to postscript file?

John W. Eaton-6
On 12-May-1997, Dr. G. Buerger <[hidden email]> wrote:

| simple question: how do I send my plots to a postscript file? - I
| knew how to do it in gnuplot but I feel too tired to do this again.

Once you have the plot you want on the screen, you can issue the
following commands:

  gset term postscript
  gset output "foo.ps"
  replot

return to plotting on the screen with

  gset term x11  # or whatever your terminal type really is

The first chapter of the manual includes an example like this.  It
should also be included (or cross-referenced) in the chapter on
plotting, but I don't think it is (yet).

jwe

Reply | Threaded
Open this post in threaded view
|

Re: how send output to postscript file?

Mario Storti-4
In reply to this post by Dr. G. Buerger-2

> Hi octave,
>
> simple question: how do I send my plots to a postscript file? - I knew how to do
> it in gnuplot but I feel too tired to do this again.
>
> Gerd

This script print.m at the bottom does the job. You call as follows:

> octave:6> print("myfile")
> sending to file: myfile.ps
> octave:7> ls *.ps
> myfile.ps
>

Note, that the term is reset to be the X server, so that afterwards
you continue to have plots on the screen.

================ cut here file: print.m =======================
function print(file);

disp(["sending drawing to PostScript file: " file ".ps"])
set term postscript
eval(["set output \"" file ".ps\""])
replot
set output
set term X
endfunction
=============== cut here =======================================

Hope this helps

Mario

%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%%<>%%%%%
Mario Alberto Storti               | Fax: (54)(42) 55.09.44 |
Grupo de Tecnologia Mecanica       | Tel: (54)(42) 55.91.75 |
INTEC, Guemes 3450 - 3000 Santa Fe | Home: Gob. Vera 3161   |
Argentina                          |       (54)(42) 55.00.23|
Reply: [hidden email]  |                        |
                http://venus.unl.edu.ar/gtm-eng.html        |