lgca.plots.IdentityColourMapper¶
- class lgca.plots.IdentityColourMapper(cmap, children_nlist, parent_list)¶
Bases:
objectMaps from the family ID to a matplotlib colour that encodes the family identity. Prevents families from sharing a colour with their children, siblings and parent
- get_colour(fam_ID)¶
Pick a colour for a family, if it has been requested before return the old colour. :type fam_ID: :param fam_ID: some hashable identifier for each family :returns: 3-tuple of RGB-values or name of a colour