[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
strange behavior from gnuplot
From: |
John W. Eaton |
Subject: |
strange behavior from gnuplot |
Date: |
Wed, 26 Nov 2003 12:33:53 -0600 |
On 26-Nov-2003, Mikel Maron <address@hidden> wrote:
| I have just begun using octave (on cygwin), having worked with matlab
| at my university.
|
| As a first try, I ran my small matlab file, which plots a set of
| differential equations (the Lokta-Volterra predator-prey model).
|
| After plotting several dozen points, with "hold on", gnuplot slows down
| significantly, and after several hundred points, freezes completely. My
| fuzzy diagnosis: gnuplot can only hold so many plots, even if there are
| simply a single point.
|
| Perhaps there is something naive in my code/plot. Perhaps something
| else. Suggestions and help much appreciated. Code is pasted in below.
In Octave, "hold on" followed by a series of plot commands is
implemented by doing something that is essentially equivalent to a
series of commands like this in gnuplot:
plot x1
replot x2
replot x3
...
which gnuplot handles by creating ever longer plot commands, then
replotting everything. Also, since Octave's interface with gnuplot
uses temporary files to store the data, you are generating one data
file for every plot command.
It would probably be much better if you cached all the data you want
to plot, then issued a new single plot command for each update with
hold off.
jwe
-------------------------------------------------------------
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
-------------------------------------------------------------