While working on it, I managed to find the solution. It's fairly simple, and allows for a lot of control over what is going on and keeping everything inside the Symfony framework.
Firstly, it should have been
new \Graph(350, 250);
and
new \LinePlot();
Without the \, Symfony was thinking it was part of its framework and not an included library like I had.
To get the image to actually display, I had to do the following in the controller beyond fixing the above:
// Display the graph
$gdImgHandler = $graph->Stroke(_IMG_HANDLER);
//Start buffering
ob_start();
//Print the data stream to the buffer
$graph->img->Stream();
//Get the conents of the buffer
$image_data = ob_get_contents();
//Stop the buffer/clear it.
ob_end_clean();
//Set the variable equal to the base 64 encoded value of the stream.
//This gets passed to the browser and displayed.
$image = base64_encode($image_data);
$redirect = $this->render('Bundle:Folder:file.html.twig', array(
'EncodedImage' => $image,
));
return $redirect;
And then inside Twig:
<img src="data:image/png;base64, {{ EncodedImage }}" />