@@ -1709,6 +1709,31 @@ C<linespoints>).
1709
1709
Selects a fractional size for point glyphs, relative to the default size
1710
1710
on your terminal, for plots that render points as small glyphs.
1711
1711
1712
+ =item fillcolor (abbrev 'fc')
1713
+
1714
+ Fills an area plot like C<filledcurves > with a color.
1715
+ It has the same format as C<linecolor > . This will fill the whole plot with
1716
+ the same color. To fill above a threshold or below a threshold, you need to
1717
+ use C<above > and C<below > options.
1718
+
1719
+ An example to plot data in a single function call is below:
1720
+
1721
+ plot({ with => 'filledcurves', fillcolor => 'green', above => 'y=0' },
1722
+ x, y,
1723
+ { with => 'filledcurves', fillcolor => 'red', below => 'y=0' },
1724
+ x, y);
1725
+
1726
+
1727
+ =item below
1728
+
1729
+ This is used for C<filledcurves > to set a C<fillcolor > below a threshold.
1730
+ You can set the value like "y=0" if you want to color below the Y-axis value of 0.
1731
+
1732
+ =item above
1733
+
1734
+ This is used for C<filledcurves > to set a C<fillcolor > above a threshold.
1735
+ You can set the value like "y=0" if you want to color above the Y-axis value of 0.
1736
+
1712
1737
=item fillstyle (abbrev 'fs')
1713
1738
1714
1739
Specify the way that filled regions should be colored, in plots that
@@ -3479,7 +3504,7 @@ EOF
3479
3504
# The search over @$with will disappear with the deprecated compound-with form;
3480
3505
# the real one is the second line that scans through curve options.
3481
3506
my $ExtraColumns = grep /(palette|variable)/, @$with ;
3482
- for my $k (qw/ linecolor textcolor fillstyle pointsize linewidth/ ) {
3507
+ for my $k (qw/ linecolor textcolor fillstyle pointsize linewidth fillcolor / ) {
3483
3508
my $v = $chunk {options }{$k };
3484
3509
next unless defined ($v );
3485
3510
my $s = ref $v eq ' ARRAY' ? join (" " ,@$v ) : $v ;
@@ -5234,6 +5259,15 @@ our $cOptionsTable = {
5234
5259
' linewidth' => [' s' , ' css' , undef , 12],
5235
5260
' linecolor' => [' l' , ' ccolor' , undef , 13],
5236
5261
' textcolor' => [' l' , ' ccolor' , undef , 14],
5262
+ ' below' => [ ' l' , sub {
5263
+ return " $_ [0] $_ [1][0]" if (defined $_ [1] and defined $_ [1][0]);
5264
+ return " " ;
5265
+ }, undef , 9.2],
5266
+ ' above' => [ ' l' , sub {
5267
+ return " $_ [0] $_ [1][0]" if (defined $_ [1] and defined $_ [1][0]);
5268
+ return " " ;
5269
+ }, undef , 9.3],
5270
+ ' fillcolor' => [' l' , ' ccolor' , [' above' , ' below' ], 14.5],
5237
5271
' pointtype' => [' s' , ' cs' , undef , 15],
5238
5272
' pointsize' => [' s' , ' css' , undef , 16],
5239
5273
' fillstyle' => [' l' , ' cl' , undef , 17],
@@ -5266,7 +5300,8 @@ our $cOptionsAbbrevs = _gen_abbrev_list(keys %$cOptionsTable);
5266
5300
lc => [" linecolor" ],
5267
5301
pt => [" pointtype" ],
5268
5302
ps => [" pointsize" ],
5269
- fs => [" fillstyle" ]
5303
+ fs => [" fillstyle" ],
5304
+ fc => [" fillcolor" ],
5270
5305
};
5271
5306
for my $k (%$officialAbbrevs ){
5272
5307
$cOptionsAbbrevs -> {$k } = $officialAbbrevs -> {$k };
0 commit comments