from brewer2mpl import qualitative, sequential, diverging, wesanderson, tableau from brewer2mpl.colormap import ColorMap def display_maps(module): for k in dir(module): thing = getattr(module, k) if isinstance(thing, dict) and 'max' in thing: thing = thing['max'] if isinstance(thing, ColorMap): thing.show_as_blocks() print(k) display_maps(diverging) display_maps(qualitative) display_maps(sequential) for name, colormap in sorted(tableau.get_all_maps().viewitems()): colormap.show_as_blocks() print(name) display_maps(wesanderson)