graph painting