graph generation