In this modified example from a file of values (meteoclimatic.htm) simple graphics (located in the images directory) with built-in graphics functions PHP , completing the graphics is very fast and versatile.
a link to the complete sample:
meteo.zip
The main script code: