@classmethod<EOL><INDENT>def map(cls, x, palette, limits, na_value=None, oob=censor):<DEDENT>
x = oob(rescale(x, _from=limits))<EOL>pal = palette(x)<EOL>try:<EOL><INDENT>pal[pd.isnull(x)] = na_value<EOL><DEDENT>except TypeError:<EOL><INDENT>pal = [v if not pd.isnull(v) else na_value for v in pal]<EOL><DEDENT>return pal<EOL>
Map values to a continuous palette

Parameters
----------
x : array_like
    Continuous values to scale
palette : callable ``f(x)``
    palette to use
na_value : object
    Value to use for missing values.
oob : callable ``f(x)``
    Function to deal with values that are
    beyond the limits

Returns
-------
out : array_like
    Values mapped onto a palette