Graphs generator improvements

Hello,
Second try for PR.

Regards
Philippe M.