From bug-request at octave dot org Thu Jan 27 10:26:40 2005 Subject: "no data point found" trying to plot 2D From: "John W. Eaton" To: lzabaleta at fibertel dot com dot ar Cc: bug at octave dot org Date: Thu, 27 Jan 2005 11:30:12 -0500 On 27-Jan-2005, lzabaleta at fibertel dot com dot ar wrote: | Bug report for Octave 2.1.64 configured for i686-pc-linux-gnu | | Hi, I tried the first example that appears in Octave documentation under | the title "Plotting - Two-Dimensional Plotting" that is | | gplot rand (100,1) with linespoints | | And I got this: | | octave:1> gplot rand (100,1) with linespoints | octave:2> | gnuplot> pl '/tmp/oct-72oAwd' u 1:2 t "line 1" w linespoints | ^ | line 0: no data point found in specified file | | As you can see at the prompt, this is the first command I tried. | | As the error message is generated by gnuplot, I tried to use the same | command | in gnuplot and it failed the same until I changed the command, eliminating | the part | "u 1:2". So, the command | | pl '/tmp/oct-72oAwd' t "line 1" w linespoints | | works fine! | | Any idea about this problem ? Oops, this probably was introduced recently when I tried to fix plotting with time formats. Please try the following patch. Thanks, jwe 2005-01-27 John W. Eaton * pt-plot.cc (handle_plot_data): Use the correct using clause for 2D plots with only one column of data and for non-parametric 3D plots. Index: pt-plot.cc =================================================================== RCS file: /usr/local/cvsroot/octave/src/Attic/pt-plot.cc,v retrieving revision 1.146 diff -u -r1.146 pt-plot.cc --- pt-plot.cc 18 Oct 2004 16:27:44 -0000 1.146 +++ pt-plot.cc 27 Jan 2005 16:20:09 -0000 at @ -760,7 +760,9 @@ plot_buf << " '" << file << "' " << Vgnuplot_command_using - << (ndim == 2 ? " 1:2" : " 1:2:3"); + << (ndim == 2 + ? (tmp_data.columns () == 2 ? " 1:2" : " 1") + : (parametric_plot ? " 1:2:3" : " 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 -------------------------------------------------------------