#data-set 1 has @x_values1 and @y_values1 # data-set 2 has @x_values2 and @y_values2 # for one data-set it is: my @graph_data = (\@x_values1, \@y_values1);