#$myvar.= '$h'."$counter_objects".", "; #push @all_vars, $myvar; #${h."$counter_objects"} = Chart::Gnuplot::DataSet->new my $ds = Chart::Gnuplot::DataSet->new( xdata => \@x, ydata => \@tmp_y, title => "$legend_name", fill => {density => 0.2}, style => "histograms", ); push @all_vars, $ds; } $chart->plot2d(@all_vars); # no \