Jump to content

DRawing Graphs


phpSensei

Recommended Posts

Now what would be the best approach for this? I required of no coding help, just some PHP tips...

 

I already have this going

 

<?php
$img = imagecreatetruecolor(600,600);
// Lmao
$black = imagecolorallocate($img, 0,0,0);
$white = imagecolorallocate($img, 255,255,255);

imagefill($img,0,0,$white);
imageline($img,0,0,0,500,$black);
imageline($img,0,500,500,500,$black);
header('Content-Type: image/png');
imagepng($img);
imagedestroy($img);
?>

 

This draws the x and y axis, but the approach seems corky for some reason. any ideas or tips?

Link to comment
https://forums.phpfreaks.com/topic/139941-drawing-graphs/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.