mirror of
https://github.com/dkogan/feedgnuplot.git
synced 2025-05-05 22:11:12 +08:00
added function to add options to single curves
This commit is contained in:
parent
a86cd8c621
commit
5f40f298d4
@ -305,15 +305,7 @@ sub mainThread {
|
||||
# For the values requested to be printed on the y2 axis, set that
|
||||
foreach my $y2idx (@{$options{"y2"}})
|
||||
{
|
||||
my $str = " axes x1y2 linewidth 3";
|
||||
if(exists $curves[$y2idx])
|
||||
{
|
||||
$curves[$y2idx][0]{"options"} .= $str;
|
||||
}
|
||||
else
|
||||
{
|
||||
newCurve("", $str, undef, $y2idx);
|
||||
}
|
||||
addCurveOption($y2idx, 'axes x1y2 linewidth 3');
|
||||
}
|
||||
|
||||
# regexp for a possibly floating point, possibly scientific notation number, fully captured
|
||||
@ -503,6 +495,19 @@ sub newCurve
|
||||
}
|
||||
}
|
||||
|
||||
sub addCurveOption
|
||||
{
|
||||
my ($idx, $str) = @_;
|
||||
if(exists $curves[$idx])
|
||||
{
|
||||
$curves[$idx][0]{"options"} .= " $str";
|
||||
}
|
||||
else
|
||||
{
|
||||
newCurve('', $str, undef, $idx);
|
||||
}
|
||||
}
|
||||
|
||||
sub pushNewEmptyCurve
|
||||
{
|
||||
my $opts = "notitle ";
|
||||
|
Loading…
Reference in New Issue
Block a user