def grey_pal(start=<NUM_LIT>, end=<NUM_LIT>):
gamma = <NUM_LIT><EOL>ends = ((<NUM_LIT:0.0>, start, start), (<NUM_LIT:1.0>, end, end))<EOL>cdict = {'<STR_LIT>': ends, '<STR_LIT>': ends, '<STR_LIT>': ends}<EOL>grey_cmap = mcolors.LinearSegmentedColormap('<STR_LIT>', cdict)<EOL>def continuous_grey_palette(n):<EOL><INDENT>colors = []<EOL>for x in np.linspace(start**gamma, end**gamma, n):<EOL><INDENT>x = (x ** (<NUM_LIT:1.>/gamma) - start) / (end - start)<EOL>colors.append(mcolors.rgb2hex(grey_cmap(x)))<EOL><DEDENT>return colors<EOL><DEDENT>return continuous_grey_palette<EOL>
Utility for creating continuous grey scale palette

Parameters
----------
start : float
    grey value at low end of palette
end : float
    grey value at high end of palette

Returns
-------
out : function
    Continuous color palette that takes a single
    :class:`int` parameter ``n`` and returns ``n``
    equally spaced colors.

Examples
--------
>>> palette = grey_pal()
>>> palette(5)
['#333333', '#737373', '#989898', '#b5b5b5', '#cccccc']