changeset 2542:484977eb65ad

[project @ 1996-11-20 02:17:08 by jwe]
author jwe
date Wed, 20 Nov 1996 02:18:00 +0000
parents 80a42c3fefc9
children 050924aee81a
files src/ChangeLog src/lex.l src/parse.y src/pt-plot.cc
diffstat 4 files changed, 23 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,9 @@
 Tue Nov 19 12:01:13 1996  John W. Eaton  <jwe@bevo.che.wisc.edu>
 
+	* lex.l (plot_style_token): Add new plot styles for gnuplot 3.6.
+	* pt-plot.cc (subplot_style::errorbars): Recognize more errorbar
+	plot types.
+
 	* sighandlers.cc (my_friendly_exit): If we are called twice, try
 	to remove the signal handler for SIGABRT and the call abort ().
 
--- a/src/lex.l
+++ b/src/lex.l
@@ -850,13 +850,22 @@
     {
       "boxes",
       "boxerrorbars",
+      "boxxyerrorbars",
+      "candlesticks",
       "dots",
       "errorbars",
+      "financebars",
+      "fsteps",
+      "histeps",
       "impulses",
       "lines",
       "linespoints",
       "points",
       "steps",
+      "vector",
+      "xerrorbars",
+      "xyerrorbars",
+      "yerrorbars",
       0,
     };
 
--- a/src/parse.y
+++ b/src/parse.y
@@ -569,11 +569,8 @@
 		  { $$ = new subplot_style ($2->text ()); }
 		| WITH STYLE expression
 		  { $$ = new subplot_style ($2->text (), $3); }
-		| WITH STYLE expression bogus_syntax expression
-		  { $$ = new subplot_style ($2->text (), $3, $5); }
-		;
-
-bogus_syntax	: // empty
+		| WITH STYLE expression expression
+		  { $$ = new subplot_style ($2->text (), $3, $4); }
 		;
 
 ans_expression	: expression
--- a/src/pt-plot.cc
+++ b/src/pt-plot.cc
@@ -602,8 +602,12 @@
 int
 subplot_style::errorbars (void)
 {
-  return (almost_match ("errorbars", sp_style, 1, 0)
-	  || almost_match ("boxerrorbars", sp_style, 5, 0));
+  return (almost_match ("boxerrorbars", sp_style, 5, 0)
+	  || almost_match ("boxxyerrorbars", sp_style, 4, 0)
+	  || almost_match ("errorbars", sp_style, 1, 0)
+	  || almost_match ("xerrorbars", sp_style, 2, 0)
+	  || almost_match ("xyerrorbars", sp_style, 2, 0)
+	  || almost_match ("yerrorbars", sp_style, 1, 0));
 }
 
 void
@@ -647,9 +651,9 @@
     {
       int nc = retval.columns ();
 
-      if (nc < 3 || nc > 4)
+      if (nc < 3 || nc > 6)
 	{
-	  error ("plots with errorbars require 3 or 4 columns of data");
+	  error ("plots with errorbars require 3 to 6 columns of data");
 	  error ("but %d were provided", nc);
 	  return octave_value ();
 	}