octave-maintainers
[Top][All Lists]
Advanced

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

RE: about gplot


From: Lippert, Ross A.
Subject: RE: about gplot
Date: Fri, 16 May 2003 08:54:10 -0400

someone one this list gave me a function called figfig which will do what you
want it to do.
 
The way it works is that it prints the file out in .fig format, which xfig then
converts to anythng you specify using the fig2dev command.
 
You can do this yourself by printing as a fig and then running fig2dev yourself
or bringing it up in xfig and exporting (which I sometimes do just to tweak
colors and labels).
 
I am sending this via MS outlook, so there is a good chance that it will insert
linebreaks in lines which are too long.  You will have to fix those for it to run.
 
 
-r
 
function figfig(filename,language)
  ## Usage: figfig(filename[,language])
  ## Puts octave figure into fig file (filename.fig)
  ## If second argument, converts to filename.language using fig2dev
  ## eg:
  ##    figfig("foo");
  ##    figfig("foo","ps");
  ##    figfig("foo","pdf");
 
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id: figfig.m,v 1.1 2000/11/03 10:43:10 peterg Exp peterg $
  ## $Log: figfig.m,v $
  ## Revision 1.1  2000/11/03 10:43:10  peterg
  ## Initial revision
  ###############################################################
 
  figfilename = sprintf("%s.fig",filename);
 
  eval(sprintf("gset output \"%s\" ",figfilename));
 
  gset term fig color portrait fontsize 16 size 20 10 metric
function figfig(filename,language)
  ## Usage: figfig(filename[,language])
  ## Puts octave figure into fig file (filename.fig)
  ## If second argument, converts to filename.language using fig2dev
  ## eg:
  ##    figfig("foo");
  ##    figfig("foo","ps");
  ##    figfig("foo","pdf");
 
  ###############################################################
  ## Version control history
  ###############################################################
  ## $Id: figfig.m,v 1.1 2000/11/03 10:43:10 peterg Exp peterg $
  ## $Log: figfig.m,v $
  ## Revision 1.1  2000/11/03 10:43:10  peterg
  ## Initial revision
  ###############################################################
 
  figfilename = sprintf("%s.fig",filename);
 
  eval(sprintf("gset output \"%s\" ",figfilename));
 
  gset term fig color portrait fontsize 16 size 20 10 metric
  replot;
  gset term x11
  gset output
  replot;
 
  ## Add a box - makes a visible bounding box
#  fid = fopen(figfilename,"a+");
#  fprintf(fid,"2 4 0 2 31 7 50 0 -1 0.000 0 0 7 0 0 5\n");
#  fprintf(fid,"\t9675 5310 9675 270 225 270 225 5310 9675 5310\n");
#  fclose(fid);
 
  if nargin>1                   # Do a ps file
    psfilename = sprintf("%s.%s",filename,language);
    convert = sprintf("fig2dev -L%s %s > %s", language, figfilename, psfilename)
    system(convert);
  endif
 
endfunction
-----Original Message-----
From: myong [mailto:address@hidden
Sent: Friday, May 16, 2003 5:57 AM
To: address@hidden; octave-maintainers
Subject: Re: about gplot

if I want save as a png file, how can I do?

address@hidden wrote:
gset term post
gset out 'file.ps'
replot

will produce a postscript file

B. Roessli

On Fri, 16 May 2003, myong wrote:

  
This message uses a character set that is not supported by the Internet
Service.  To view the original message content,  open the attached
message. If the text doesn't display correctly, save the attachment to
disk, and then open it using a viewer that can display the original
character set. <<message.txt>> 

    




  

--
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with address@hidden http://shopnow.netscape.com/


reply via email to

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