def make_aes(x=None, y=None, size=None, colour=None, shape=None, alpha=None):
    if not hasattr(size, '__call__') and size is not None:
        size = ScaleConstant(size)
    if not hasattr(colour, '__call__') and colour is not None:
        colour = ScaleConstant(colour)
    if not hasattr(shape, '__call__') and shape is not None:
        shape = ScaleConstant(shape)
    if not hasattr(alpha, '__call__') and alpha is not None:
        alpha = ScaleConstant(alpha)
    if any([isinstance(size, scale)
            for scale in [ScaleConstant, ScaleSize]]) or size is None:
        pass
    else:
        raise ValueError(
            'size mapping should be done through ScaleConstant or ScaleSize')
    if (any([isinstance(colour, scale)
             for scale in [ScaleConstant, ScaleGradient,
                           ScaleGradient2, ScaleRandomColour]]) or
            colour is None):
        pass
    else:
        raise ValueError('colour mapping should be done through '
                         'ScaleConstant, ScaleRandomColour, ScaleGradient '
                         'or ScaleGradient2')
    if (any([isinstance(shape, scale)
             for scale in [ScaleConstant, ScaleShape]]) or
            shape is None):
        pass
    else:
        raise ValueError('shape mapping should be done through ScaleConstant '
                         'or ScaleShape')
    if (any([isinstance(alpha, scale) for scale in [ScaleConstant]]) or
            alpha is None):
        pass
    else:
        raise ValueError('alpha mapping should be done through ScaleConstant')
    return {
        'x': x,
        'y': y,
        'size': size,
        'colour': colour,
        'shape': shape,
        'alpha': alpha,
    }
Create an empty aesthetics dictionary.
dataset/ETHPy150Open pydata/pandas/pandas/tools/rplot.py/make_aes