Functions to generate data for graphs implemented.