def work(self, fig=None, ax=None):
        if ax is None:
            if fig is None:
                return fig, ax
            else:
                ax = fig.gca()
        for index in range(len(self.data)):
            row = self.data.iloc[index]
            x = row[self.aes['x']]
            y = row[self.aes['y']]
            size_scaler = self.aes['size']
            colour_scaler = self.aes['colour']
            shape_scaler = self.aes['shape']
            alpha = self.aes['alpha']
            size_value = size_scaler(self.data, index)
            colour_value = colour_scaler(self.data, index)
            marker_value = shape_scaler(self.data, index)
            alpha_value = alpha(self.data, index)
            patch = ax.scatter(x, y,
                               s=size_value,
                               c=colour_value,
                               marker=marker_value,
                               alpha=alpha_value)
            label = []
            if colour_scaler.categorical:
                label += [colour_scaler.column, row[colour_scaler.column]]
            if shape_scaler.categorical:
                label += [shape_scaler.column, row[shape_scaler.column]]
            self.legend[tuple(label)] = patch
        ax.set_xlabel(self.aes['x'])
        ax.set_ylabel(self.aes['y'])
        return fig, ax
Render the layer on a matplotlib axis.
dataset/ETHPy150Open pydata/pandas/pandas/tools/rplot.py/GeomPoint.work