psychopy_ext.plot.Plot.get_colors

Plot.get_colors(ncolors=2, cmap='Paired')[source]

Get a list of nice colors for plots.

FIX: This function is happy to ignore the ugly settings you may have in your matplotlibrc settings. TODO: merge with mpltools.color

Kwargs:
ncolors (int, default: 2)

Number of colors required. Typically it should be the number of entries in the legend.

cmap (str or matplotlib.cm, default: ‘Paired’)

A colormap to sample from when ncolors > 12

Returns:

a list of colors