update ex06 (draw a graph).