help-octave
[Top][All Lists]
Advanced

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

saving plot images in arbitrary sizes.


From: general questions
Subject: saving plot images in arbitrary sizes.
Date: Sat, 31 Jan 2004 16:26:53 +0000 (GMT)

Dear Octave users,

I found a script to save plots as PNG (see below
'plot2png()') but this only saves as 640 x 480.  Is it
possible to save at a higher resolution as I require
finer detail?
I found a previous post which regarding GIFs instead
of PNGs said you can have the gset command changed to:
  gset terminal gif small size 640,480
and I expected to be able to change the given
resolution for PNGs, but octave's gset didn't seem to
understand the term 'size'.

Is there a way I can save plots as, say 1600 x 1200?

I'm using "GNU Octave, version 2.1.50
(i686-pc-linux-gnu).".

cheers,
   Lee -S-
   UniS, UK


function plot2png(f)
  gset terminal png small color;
  eval(sprintf("gset output \"%s%s\" \n",f,".png"));
  replot;
  gset terminal X11;
  printf("\nWrote %s/%s%s \n \n",pwd,f,".png");
endfunction



________________________________________________________________________
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 
http://btyahoo.yahoo.co.uk



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