Update the graph function sample.