Affinity for graphs