# HG changeset patch # User jwe # Date 848456280 0 # Node ID 484977eb65ad18ebd3cc6d4b862a49813c3ef168 # Parent 80a42c3fefc9468638c61103ece7a40514be238b [project @ 1996-11-20 02:17:08 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ Tue Nov 19 12:01:13 1996 John W. Eaton + * 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 (). diff --git a/src/lex.l b/src/lex.l --- 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, }; diff --git a/src/parse.y b/src/parse.y --- 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 diff --git a/src/pt-plot.cc b/src/pt-plot.cc --- 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 (); }