From fec440c8b3ba6405d2a21f3f39991bc23fa33c84 Mon Sep 17 00:00:00 2001 From: Dima Kogan Date: Sat, 30 Sep 2017 22:53:43 -0700 Subject: [PATCH] --curvestyle now overrides --curvestyleall This is how it was supposed to work, but apparently it didn't work this way: --curvestyleall options were active for ALL the curves --- bin/feedgnuplot | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/feedgnuplot b/bin/feedgnuplot index 2d17876..18fb7ca 100755 --- a/bin/feedgnuplot +++ b/bin/feedgnuplot @@ -979,7 +979,8 @@ sub updateCurveOptions $usingoptions = "using 1:" . join(':', @rest); } - $curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions} $options{curvestyleall}"; + + $curve->{options} = "$histoptions $usingoptions $titleoption $curve->{extraoptions}"; } sub getCurve @@ -998,7 +999,11 @@ sub getCurve if( !exists $curveIndices{$id} ) { - push @curves, {extraoptions => ' ', + push @curves, {# if we have a catch-all style and no specific style, use + # the catch-all style + extraoptions => (!exists $options{curvestyle_hash}{$id} && + exists $options{curvestyleall}) ? + "$options{curvestyleall} " : ' ', datastring => '', datastring_meta => [], datastring_offset => 0}; # push a curve with no data and no options