[Tech] aiuto per octave

Carlo Baffa baffa@arcetri.astro.it
Ven 26 Lug 2002 16:14:09 CEST


On Fri, 26 Jul 2002, Valerio Montagnani wrote:

> Ciao a tutti.
> Sono alle prese con l'esportazione di un grafico prodotto con octave.
> Vorrei registrare il grafico in formato ps.
> Usando octave-2.1.33 ho scoperto che esiste una funzione, chiamata
> graph2file, che permette di catturare l'output di un grafico (generato con
> plot) e registrarlo nella dir di lavoro. Proprio quello che fa al caso
> mio!!!! Purtroppo non ho la documentazione della sintassi. L'help on line
> non dà informazioni e io non riesco ad andare avanti. Ho cercato in rete
> ma non ho trovato niente a riguardo.

Octave usa gnuplot per fare grafica, e sono disponibili (vedi documentazione)
i comandi base set e show di gnuplot (con il nome gset e gshow).
In particolare il comando gset term postscript ha, nella documentazioni ein
linea di gnuplot la seguente sintassi:

         set terminal postscript {<mode>} {<color>} {<dashed>}
                                 {"<fontname>"} {<fontsize>}

 where <mode> is `landscape`, `portrait`, `eps` or `default`.
 Selecting default sets all options to their defaults.
 <color> is either `color` or `monochrome`.
 <dashed> is either `solid` or `dashed`.
 "<fontname>" is the name of a valid PostScript font.
 <fontsize> is the size of the font in PostScript points.
 Defaults are `landscape`, `monochrome`, `dashed`, "Helvetica", and 14pt.
 Default size of PostScript plot is landscape mode 10 inches wide
 and 7 inches high.

 To get EPS output, use the `eps` mode and make only one plot per file.
 In `eps` mode the whole plot is halved in size; the fonts are half the
 given size, and the plot is 5 inches wide and 3.5 inches high.


 Examples:

Press return for more:
         set term postscript default       # old postscript
         set term postscript landscape 22  # old psbig
         set term postscript eps 14   # old epsf1
         set term postscript eps 22   # old epsf2
         set size 0.7,1.4
         set term post portrait color "Times-Roman" 14

Con gset output puoi mandare direttamente in stampa :

Subtopic of set: output
 By default, plots are displayed to the standard output. The
 `set output` command redirects the display to the specified file
 or device.

 Syntax:
         set output {"<filename>"}
         show output

 The filename must be enclosed in quotes. If the filename is
 omitted, output will be sent to the standard output.

 On machines with popen functions (UNIX), output can be piped
 through a shell command if the first letter of the filename
 is '|'.  For instance,

 Syntax:
         set output "|lpr -Plaser filename"
         set output "|lp -dlaser filename"


Ciao
Carlo


 Carlo Baffa                   INAF - Osservatorio Astrofisico di Arcetri
 baffa@arcetri.astro.it               Largo Fermi 5
 http://www.arcetri.astro.it/~baffa/  I-50125-Firenze ITALY
----
 Computers are like air conditioners: they stop working properly when
 you open Windows




Maggiori informazioni sulla lista flug-tech