octave-maintainers
[Top][All Lists]
Advanced

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

Re: Controlling Gnuplot from Octave


From: John W. Eaton
Subject: Re: Controlling Gnuplot from Octave
Date: Wed, 13 Jun 2007 19:36:33 -0400

On 14-Jun-2007, David Bateman wrote:

| tlhiv wrote:
| > I have noticed that in recent versions of Octave that gset is now gone.  How
| > can I control the aspect ratio of my plot?  Could someone tell me the way to
| > perform this old commands with the new syntax:
| > 
| > gset size ratio 2/(1+sqrt(5))
| > 
| > In fact, how would I specify the width/height of an output EPS
  graphic?

That is beyond the scope of Octave graphics at the moment.  If you
need that kind of control, then you will have to do it by writing out
your data and using some other plotting package.  Will gnuplot allow
you to specify the size of the resulting EPS image directly?

| > In
| > particular, I want an EPS graphic that is 3 inches wide and as tall as it
| > needs to be to contain the axis labels, titles, etc. but have the actual box
| > that contains the plot have a 2/(1+sqrt(5)) aspect ratio.
| > 
| > Thanks,
| > 
| > Troy
| > 
| 
| What version of Octave are you using? The graphics are entirely
| different for 2.9.9 and earlier and 2.9.10 and later. If you are using
| 2.9.9 or earlier then replace gset with __gnuplot_set__, Otherwise in
| 2.9.10 and later, I believe the only control we currently have over the
| aspect ratio is axis("square") and family..

The axis command simply controls plot properties.  I think the
dataaspectratio property will do what you want:

  x = -10:0.1:10;
  plot (x, sin(x));
  set (gca, 'dataaspectratio', [2/(1+sqrt(5)), 1, 1])

In any case, please use the help list for questions about using
Octave.  The maintainers list is for discussions about the development
of Octave.

jwe


reply via email to

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