http://www.perlmonks.org?node_id=1042933


in reply to Re^8: Is this the correct structure?
in thread Is this the correct structure?

You have 2 problems. First the data array need to be transposed to create 4 rows with 17 columns

while(<IN>){ chomp; my @cols = split/\s+/,$_; for my $ix (0..$#cols){ push @{$data[$ix]}, $cols[$ix]; } }

and second, in the creation of the dataset use

ydata => [ @{$data[$y]} ],
otherwise you create a reference to the same data each time

poj

Replies are listed 'Best First'.
Re^10: Is this the correct structure?
by Anonymous Monk on Jul 06, 2013 at 18:01 UTC
    YES!
    It works correctly now!
    Thank you for all your effort and time poj!