changeset 5046:ea74d76ff607

[project @ 2004-10-18 16:27:43 by jwe]
author jwe
date Mon, 18 Oct 2004 16:27:44 +0000
parents f09fd9e154e8
children 36f954d8d53a
files src/ChangeLog src/pt-plot.cc
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Tue Oct 12 12:10:02 2004 +0000
+++ b/src/ChangeLog	Mon Oct 18 16:27:44 2004 +0000
@@ -1,3 +1,8 @@
+2004-10-18  John W. Eaton  <jwe@octave.org>
+
+	* pt-plot.cc (handle_plot_data): If plotting data from file,
+	always use "using" clause.
+
 2004-10-12  David Bateman  <dbateman@free.fr>
 
 	* pt-mat.cc (tm_row_const::tm_row_const_rep::do_init_element,
--- a/src/pt-plot.cc	Tue Oct 12 12:10:02 2004 +0000
+++ b/src/pt-plot.cc	Mon Oct 18 16:27:44 2004 +0000
@@ -731,9 +731,6 @@
 	    }
 	  else
 	    {
-	      // Eliminate the need for printing a using clause to
-	      // plot_buf.
-
 	      octave_value tmp_data = extract_plot_data (ndim, data);
 
 	      if (tmp_data.is_defined ())
@@ -757,7 +754,13 @@
 		  if (file.length () > 0)
 		    {
 		      mark_for_deletion (file);
-		      plot_buf << " '" << file << "'";
+
+		      // Include the using clause so that plotting
+		      // with timefmt will work.
+
+		      plot_buf << " '" << file << "' "
+			       << Vgnuplot_command_using
+			       << (ndim == 2 ? " 1:2" : " 1:2:3");
 		    }
 		}
 	    }