plot

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

plot

Michael Gass-2

Am running octave version 2.0.1 (mips-sgi-irix5.3).

Why is "plot" plotting everthing twice?

Example:
x = [1 2];
y = [3 4];
plot(x,y)
          The above results in the plot being generated twice.
          What am I doing wrong?
plot(x)
          That works just fine.

Thanks,
[hidden email]

Reply | Threaded
Open this post in threaded view
|

plot

John W. Eaton-6
On 25-Jan-1997, Michael Gass <[hidden email]> wrote:

| Am running octave version 2.0.1 (mips-sgi-irix5.3).
|
| Why is "plot" plotting everthing twice?
|
| Example:
| x = [1 2];
| y = [3 4];
| plot(x,y)
|           The above results in the plot being generated twice.
|           What am I doing wrong?
| plot(x)
|           That works just fine.

The problem is the replot command in the __plt__.m file.  It was put
there in an attempt to solve the problem of

  x = [1, 2]; y = [3, 4]; plot (x, y, 2*x, y);

sometimes failing to display both lines the first time the plot
command is executed.  I've removed the replot and replaced it with a
different kluge for 2.0.2.

Note that there is also another problem with the current
implementation of the plot commands.  If you use a command like

  plot (x1, y1, x2, y2)

you will get one plot for each pair of arguments.  I don't see an easy
way to fix this problem now.  Perhaps it will become easier to fix
when the plot functions are rewritten for 2.1 (no promises).

Thanks,

jwe