add matrix->dict converter for labeling graphs