added function to add options to single curves

This commit is contained in:
Dima Kogan 2010-07-19 12:32:15 -07:00
parent a86cd8c621
commit 5f40f298d4

View File

@ -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 ";