in reply to how to put Chart::Gnuplot::DataSet->new and Chart::Gnuplot->new into a subroutine?
sub create_chart { my ($ydata) = @_; Chart::Gnuplot::DataSet->new( xdata => \@yfix, ydata => $ydata, style => "lines", color => "dark-gray", linetype => "dash", width => 1, ); } my $tempmin = create_chart(\@minit); my $tempmax = create_chart(\@maxit);
If you want to change other attributes, too, you might use default values with named attributes:
sub create_chart { my (%args) = @_; die "No ydata\n" unless exists $args{ydata}; Chart::Gnuplot::DataSet->new( xdata => \@yfix, style => "lines", color => "dark-gray", linetype => "dash", width => 1, %args ); } my $tempmin = create_chart(ydata => \@minit); my $tempmax = create_chart(ydata => \@maxit, color => 'red');
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|