Examples of using the CLARIFY algorithm with user specified color space/palettes

The followings are the result of applying the CLARIFY algorithm on two graphs and two maps, using RGB, LAB and various ColorBrewer palettes.

The algorithm is implemented in the graphviz function edgepaint. Type edgepaint -"?" for usage. Example (for graphs only):

cat ngk10_4.gv | neato | edgepaint | neato -n2 -Tjpg > ngk10_4.jpg

For graphs, the purpose of edge coloring is such that collision edges (those with small crossing angles, or are connected to the same node at close to 0 or 180 degree) are colored using distinctive colors. Note that for consistency we used a gray background throughout, although for some light-colored palettes, in practice it is better to use a dark background.

For maps, we like neighboring countries to have distinct colors; at the same time we also give some preference to non-neighboring countries having different colors. This is achieved by setting the weight between two countries to be the shortest path distance between them in the dual graph of the map. Note that weights are inversely proportional to the importance of the corresponding color distances.

The images are of high resolution (except those for the music map), click on each image to see details.

Karate graph

Original RGB LAB
ColorBrewer_accent_8 ColorBrewer_brbg_11 ColorBrewer_brbg_9 ColorBrewer_bupu_9
ColorBrewer_dark2_8 ColorBrewer_gnbu_9 ColorBrewer_greens_9 ColorBrewer_greys_9
ColorBrewer_oranges_9 ColorBrewer_orrd_9 ColorBrewer_paired_12 ColorBrewer_pastel1_9
ColorBrewer_pastel2_8 ColorBrewer_piyg_11 ColorBrewer_prgn_11 ColorBrewer_pubugn_9
ColorBrewer_puor_11 ColorBrewer_purples_9 ColorBrewer_rdbu_11 ColorBrewer_rdgy_11
ColorBrewer_rdpu_9 ColorBrewer_rdylbu_11 ColorBrewer_rdylgn_11 ColorBrewer_reds_9
ColorBrewer_set1_9 ColorBrewer_set2_8 ColorBrewer_set3_12 ColorBrewer_spectral_11
ColorBrewer_ylgn_9 ColorBrewer_ylorbr_9 ColorBrewer_ylorrd_9

random graphs

Original RGB LAB
ColorBrewer_accent_8 ColorBrewer_brbg_11 ColorBrewer_brbg_9 ColorBrewer_bupu_9
ColorBrewer_dark2_8 ColorBrewer_gnbu_9 ColorBrewer_greens_9 ColorBrewer_greys_9
ColorBrewer_oranges_9 ColorBrewer_orrd_9 ColorBrewer_paired_12 ColorBrewer_pastel1_9
ColorBrewer_pastel2_8 ColorBrewer_piyg_11 ColorBrewer_prgn_11 ColorBrewer_pubugn_9
ColorBrewer_puor_11 ColorBrewer_purples_9 ColorBrewer_rdbu_11 ColorBrewer_rdgy_11
ColorBrewer_rdpu_9 ColorBrewer_rdylbu_11 ColorBrewer_rdylgn_11 ColorBrewer_reds_9
ColorBrewer_set1_9 ColorBrewer_set2_8 ColorBrewer_set3_12 ColorBrewer_spectral_11
ColorBrewer_ylgn_9 ColorBrewer_ylorbr_9 ColorBrewer_ylorrd_9

Map: collaboration map of authors who published in the Int. Graph Drawing Symposium, 1994-2004

RGB LAB
ColorBrewer_accent_8 ColorBrewer_brbg_11 ColorBrewer_brbg_9 ColorBrewer_bupu_9
ColorBrewer_dark2_8 ColorBrewer_gnbu_9 ColorBrewer_greens_9 ColorBrewer_greys_9
ColorBrewer_oranges_9 ColorBrewer_orrd_9 ColorBrewer_paired_12 ColorBrewer_pastel1_9
ColorBrewer_pastel2_8 ColorBrewer_piyg_11 ColorBrewer_prgn_11 ColorBrewer_pubugn_9
ColorBrewer_puor_11 ColorBrewer_purples_9 ColorBrewer_rdbu_11 ColorBrewer_rdgy_11
ColorBrewer_rdpu_9 ColorBrewer_rdylbu_11 ColorBrewer_rdylgn_11 ColorBrewer_reds_9
ColorBrewer_set1_9 ColorBrewer_set2_8 ColorBrewer_set3_12 ColorBrewer_spectral_11
ColorBrewer_ylgn_9 ColorBrewer_ylorbr_9 ColorBrewer_ylorrd_9

Music Map

RGB LAB
ColorBrewer_accent_8 ColorBrewer_brbg_11 ColorBrewer_brbg_9 ColorBrewer_bupu_9
ColorBrewer_dark2_8 ColorBrewer_gnbu_9 ColorBrewer_greens_9 ColorBrewer_greys_9
ColorBrewer_oranges_9 ColorBrewer_orrd_9 ColorBrewer_paired_12 ColorBrewer_pastel1_9
ColorBrewer_pastel2_8 ColorBrewer_piyg_11 ColorBrewer_prgn_11 ColorBrewer_pubugn_9
ColorBrewer_puor_11 ColorBrewer_purples_9 ColorBrewer_rdbu_11 ColorBrewer_rdgy_11
ColorBrewer_rdpu_9 ColorBrewer_rdylbu_11 ColorBrewer_rdylgn_11 ColorBrewer_reds_9
ColorBrewer_set1_9 ColorBrewer_set2_8 ColorBrewer_set3_12 ColorBrewer_spectral_11
ColorBrewer_ylgn_9 ColorBrewer_ylorbr_9 ColorBrewer_ylorrd_9

An illustrate of the algorithm at work

Starting from an initial coloring, the algorithm find the optimal coloring for each country with regard to its neighbors in the author collaboration map. It converges in 20 or so iterations.