Line graph as function