You're correct that it needs to be a 2d array, however you don't have the construction of it quite right. The first arrayref in @array will be the x-values (1 and 10 in this case) and each additional array contains the corresponding y-values (2 and 20, and 3 and 30). This will actually draw two lines, with the following points:
(1,2) (10,20)
(1,3) (10,30)
In reply to Re^2: line graph GD::GRAPH
by ishnid
in thread line graph GD::GRAPH
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |