def work(self, fig=None, ax=None):
        if ax is None:
            if fig is None:
                return fig, ax
            else:
                ax = fig.gca()
        from numpy.polynomial.polynomial import polyfit
        from numpy.polynomial.polynomial import polyval
        x = self.data[self.aes['x']]
        y = self.data[self.aes['y']]
        min_x = min(x)
        max_x = max(x)
        c = polyfit(x, y, self.degree)
        x_ = np.linspace(min_x, max_x, len(x))
        y_ = polyval(x_, c)
        ax.plot(x_, y_, lw=self.lw, c=self.colour)
        return fig, ax
Construct a Schema or DataType from a discovery dictionary.
dataset/ETHPy150Open pydata/pandas/pandas/tools/rplot.py/GeomPolyFit.work--crossover with--dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/schema.py/Schema.Create