Hello,

I need to create an array of numerical data from some mathematical queries from my DB for some graphs using Jpgraph. I have the arrays displaying correctly but I am having some problems getting them into the axis points on the graph.

I basically need to transform this:

PHP Code:
//horizontal placment
$val[1] = 18;
$val[2] =  16;
$val[3] = 5;

//vertical placment
$pl[1] = 14;
$pl[2] = 9;
$pl[3] = 22
into this
PHP Code:
$data1 = array(); //should have the $val array here
$data2 = array(); //should have the $pl array here. 
Currently it works fine with one value in each array but when there are multiples it seems to either average or add the values and place them on the plot when I need them to list them one by one.

$data1 and $data2 should correspond with each other. $val[1] and $pl[1] mark the horizontal and vertical placment for tick mark 1 on the plot respectively.

Currenty my $data1 and $data2 varialbes look like this:

PHP Code:
$data1 = array($val);
$data2 = array($pl); 
Thanks.