Graph generation