[Top][All Lists]

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

xrange weirdness

From: John W. Eaton
Subject: xrange weirdness
Date: Fri, 3 Nov 2000 10:49:02 -0600

On  3-Nov-2000, Andy Jacobson <address@hidden> wrote:

|       I noticed a strange difference between gplot and gsplot today.
|       When one explicitly specifies ranges for x, gplot appears to
|       somehow reset the gnuplot autoscaling upon termination and
|       gsplot does something completely different.  This causes
|       unpleasantness if one subsequently tries to do something like
|       plot(11:20,rand(10,1)), because the xrange is screwed up.
|       "gset autoscale x" does not fix the problem.
|       To manifest the problem, try:
|       gsplot [-1:1] [-1:1] 'sin(x*y)'
|       plot(11:20,rand(10,1))          

I'm not sure what Octave should do in this case.

If you type

  splot [-1:1] [-1:1] sin(x*y)
  plot '-'
  11.00000   0.83836
  12.00000   0.13866
  13.00000   0.79230
  14.00000   0.73427
  15.00000   0.10606
  16.00000   0.78780
  17.00000   0.18131
  18.00000   0.73035
  19.00000   0.16398
  20.00000   0.35331

directly in gnuplot, you will see similar results.  Even with

  plot [*:*] [*:*] ...

or after

  set autoscale x
  set autoscale y

So maybe this is a bug in gnuplot?

|       I can't seem to find the code for gplot or gsplot anywhere in
|       the build tree.

They are handled by the parser.  Look in parse.y and


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

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

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