@legend = (1,2,3); $graph->set_legend(@legend); $graph->set_legend(qw(foo bar baz)); $graph->set_legend('foo','bar','baz');