buchi2 has asked for the wisdom of the Perl Monks concerning the following question:
I have several datasets with different y-values, sometime with different x-values, which I want to give to Chart::Gnuplot::DataSet->new.
In the moment I copy the codeblock 10times and give another ydata/xdata.More nicefull it will be, if I can do it with a subroutine, if it is possible?
in the moment e.g.:my $tempmin = Chart::Gnuplot::DataSet->new( xdata => \@yfix, ydata => \@minit, style => "lines", color => "dark-gray", linetype => "dash", width => 1, ); my $tempmax = Chart::Gnuplot::DataSet->new( xdata => \@yfix, ydata => \@maxit, style => "lines", color => "dark-gray", linetype => "dash", width => 1, );
But I have no idea, how a subroutine have to look, where I pass e.g. @x, @y and other plotparameters to?
And as next step a subroitine to which I can give some plotsets and some other parameters, like filename, for creating a picture. And call it again with other parameters for the next picture?Regards, Buchi
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: how to put Chart::Gnuplot::DataSet->new and Chart::Gnuplot->new into a subroutine?
by choroba (Cardinal) on Jul 25, 2017 at 15:06 UTC | |
Re: how to put Chart::Gnuplot::DataSet->new and Chart::Gnuplot->new into a subroutine?
by thanos1983 (Parson) on Jul 25, 2017 at 15:20 UTC |