From bug-request at octave dot org Fri Jan 13 15:17:29 2006 Subject: 2.9.4: clearplot not working with "hold on" From: "John W. Eaton" To: =?ISO-8859-1?Q?Gerd_B=FCrger?= Cc: bug at octave dot org Date: Fri, 13 Jan 2006 16:17:16 -0500 On 20-Dec-2005, Gerd Bürger wrote: | with 2.9.4, the following series of commands does not what it is | supposed to do (?): | | hold on | plot(rand(100,1)) | clearplot | plot(rand(100,1)) | | as I now see 2 lines. Please try the following patch (relative to the current CVS sources). I think this makes clearplot behave more like Matlab's clf function, which seems to turn the hold state off. jwe Index: src/ChangeLog =================================================================== RCS file: /cvs/octave/src/ChangeLog,v retrieving revision 1.1325 diff -u -r1.1325 ChangeLog --- src/ChangeLog 13 Jan 2006 19:25:43 -0000 1.1325 +++ src/ChangeLog 13 Jan 2006 21:15:02 -0000 at @ -1,5 +1,14 @@ 2006-01-13 John W. Eaton + * DLD-FUNCTIONS/__gnuplot_raw__.l (Fclearplot): For compatibility, + also turn off hold state for current figure. + +2006-01-13 Bill Denney + + * dirfns.cc: Add at seealso{} to docstrings. + +2006-01-13 John W. Eaton + * help.cc (display_help_text): Use warning() to print raw Texinfo source. Don't redirect error output for makeinfo process. Index: src/DLD-FUNCTIONS/__gnuplot_raw__.l =================================================================== RCS file: /cvs/octave/src/DLD-FUNCTIONS/__gnuplot_raw__.l,v retrieving revision 1.2 diff -u -r1.2 __gnuplot_raw__.l --- src/DLD-FUNCTIONS/__gnuplot_raw__.l 13 Jan 2006 19:25:43 -0000 1.2 +++ src/DLD-FUNCTIONS/__gnuplot_raw__.l 13 Jan 2006 21:15:03 -0000 at @ -1693,6 +1693,12 @@ { gnuplot::clear (); + octave_value_list args; + + args(0) = "off"; + + feval ("hold", args); + return octave_value_list (); } ------------------------------------------------------------- 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 -------------------------------------------------------------