Refines graphs.