graph script factorisé