From bug-request at octave dot org Mon Mar 28 09:35:23 2005 Subject: replot and related commands in 2.1.68 From: "John W. Eaton" To: Quentin Spencer Cc: "'bug at octave dot org'" Date: Mon, 28 Mar 2005 10:43:55 -0500 On 28-Mar-2005, Quentin Spencer wrote: | Bug report for Octave 2.1.68 configured for i686-pc-linux-gnu | | Description: | ----------- | | There are some problems with replot in 2.1.68. The following problem | was originally found running the title function. | | Repeat-By: | --------- | | octave:1> replot; | octave:2> replot(); | parse error: | | syntax error | | >>> replot(); | ^ | | octave:2> replot(0); | warning: Passing arguments to replot is deprecated and. | warning: will not be allowed in a future version of Octave. | warning: If you must have this functionality, use | warning: __gnuplot_replot__ instead. | error: plot: can only plot in 2 or 3 dimensions | octave:2> __gnuplot_replot__ | error: `__gnuplot_replot__' undefined near line 2 column 1 Please try the following patch. Thanks, jwe src/ChangeLog: 2005-03-28 John W. Eaton * parse.y (plot_command): Also accept "plot ()" or "replot ()". * octave.gperf: Include __gnuplot_replot__ in list of keywords. * lex.l (gripe_deprecated_gsplot): Recommend __gnuplot_splot__, not __gnuplot__splot__. Index: src/lex.l =================================================================== RCS file: /usr/local/cvsroot/octave/src/lex.l,v retrieving revision 1.217.2.3 diff -u -r1.217.2.3 lex.l --- src/lex.l 21 Mar 2005 22:14:49 -0000 1.217.2.3 +++ src/lex.l 28 Mar 2005 15:34:14 -0000 at @ -2838,7 +2838,7 @@ static void gripe_deprecated_gsplot (void) { - WARN_DEPRECATED ("gsplot", "__gnuplot__splot__"); + WARN_DEPRECATED ("gsplot", "__gnuplot_splot__"); } static void Index: src/octave.gperf =================================================================== RCS file: /usr/local/cvsroot/octave/src/octave.gperf,v retrieving revision 1.9.2.1 diff -u -r1.9.2.1 octave.gperf --- src/octave.gperf 16 Mar 2005 18:55:01 -0000 1.9.2.1 +++ src/octave.gperf 28 Mar 2005 15:34:14 -0000 at @ -84,4 +84,5 @@ __FILE__, STRING, magic_file_kw __LINE__, NUM, magic_line_kw __gnuplot_plot__, PLOT, __gnuplot_plot___kw +__gnuplot_replot__, PLOT, __gnuplot_replot___kw __gnuplot_splot__, PLOT, __gnuplot_splot___kw Index: src/parse.y =================================================================== RCS file: /usr/local/cvsroot/octave/src/parse.y,v retrieving revision 1.224.2.6 diff -u -r1.224.2.6 parse.y --- src/parse.y 16 Mar 2005 18:55:01 -0000 1.224.2.6 +++ src/parse.y 28 Mar 2005 15:34:14 -0000 at @ -1389,6 +1389,11 @@ if (! ($$ = make_plot_command ($1, 0, 0))) ABORT_PARSE; } + | PLOT '(' ')' + { + if (! ($$ = make_plot_command ($1, 0, 0))) + ABORT_PARSE; + } | PLOT ranges { maybe_warn_replot_with_args ($1); ------------------------------------------------------------- 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 -------------------------------------------------------------