help-octave
[Top][All Lists]
Advanced

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

Re: print function


From: Peter Gawthrop
Subject: Re: print function
Date: Fri, 15 Sep 2000 17:04:00 +0100 (BST)

Hi Thomas,

        I use the following Octave function:

function psfig(filename)
  ## Usage: psfig(filename)
  ## Puts figure into ps file


  ## Add .ps if not there already
  if !index(filename,".")       # Is there a .
    filename = sprintf("%s.ps",filename);
  endif
  
  eval(sprintf("gset output ŠÜ"%sŠÜ" ",filename));
  gset linestyle 1 lw 2         # Thicker lines
  gset linestyle 2 lw 2         # Thicker lines
  gset linestyle 3 lw 2         # Thicker lines
  gset linestyle 4 lw 2         # Thicker lines
  gset linestyle 5 lw 2         # Thicker lines


  gset term postscript eps  monochrome dashed  
  replot;
  gset term x11
  gset output 
  replot;

endfunction

Put 
psfig("myplot"); 
after a call to plot to generate myplot.ps.

        Hope this helps,

        P.

On Fri,
15 Sep 2000, Thomas
Halahan wrote:

> Hello,
> 
> I recall from my matlab days that there is a function:
> 
> print -Peps figure(1) 
> 
> to get the figures plotted in eps format for latex files.  I simply cannot 
> find
> an equivalent for octave.  how can I export the graphics i produce in octave?
> 
> Tom Halahan
> 
> 
> 
> -----------------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
> How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
> Subscription information:  http://www.che.wisc.edu/octave/archive.html
> -----------------------------------------------------------------------
> 
> 

 --------------------------------------------------------------------
| Prof. Peter J Gawthrop           | Tel: +44 141 330 4960/2528      |
| Centre for Systems and Control & | Fax: +44 141 330 4343           |
| Dept. of Mechanical Engineering  | Room: James Watt 603            |
| University of Glasgow            | Email: address@hidden |
| GLASGOW G12 8QQ, Scotland, UK    | URL: www.mech.gla.ac.uk/Šþpeterg |
 --------------------------------------------------------------------



-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.che.wisc.edu/octave/octave.html
How to fund new projects:  http://www.che.wisc.edu/octave/funding.html
Subscription information:  http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------



reply via email to

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