array("Label", 'Y1', 'Y2', 'Y3'), 'column_widths' => array(3, 1, 2, 3), 'column_formats' => array('%s', '%d', '%5.2f', '%6g'), 'width' => $tbl_width, 'height' => $tbl_height, 'data' => $data, 'column_alignments' => array('C', 'R', 'R', 'R'), ); $img = imagecreate($img_width, $img_height); $white = imagecolorresolve($img, 255, 255, 255); $red = imagecolorresolve($img, 255, 0, 0); imageline($img, 0, $cy, $img_width-1, $cy, $red); imageline($img, $cx, 0, $cx, $img_height-1, $red); draw_data_table($img, array_merge($base_settings, array( 'position' => array(10, 10), ))); draw_data_table($img, array_merge($base_settings, array( 'position' => array($cx + 10, 10), 'cellpadding' => 12, 'column_alignments' => array('R', 'L', 'R', 'R'), ))); draw_data_table($img, array_merge($base_settings, array( 'position' => array(10, $cy + 10), 'color' => array(0x66, 0x66, 0xcc), ))); draw_data_table($img, array_merge($base_settings, array( 'position' => array($cx + 10, $cy + 10), 'font' => 4, ))); imagepng($img);