The second pic seems to be drawn pixel by pixel with setpixel function (in case of GD extension). All you need is to fill the lower pixels with a color after drawing the one representing value.
If you would like to make a similar graph as on pic1 but filled with a color you can use imagefilledpolygon function to draw the graph.
Petr Peller
2010-03-17 08:28:47