Compute the range and break information for the panel

def setup_panel_params(self, scale_x, scale_y):
        """
        Compute the range and break information for the panel

        """
        def train(scale, limits, trans, name):
            """
            Train a single coordinate axis
            """
            if limits is None:
                rangee = scale.dimension()
            else:
                rangee = scale.transform(limits)

            # data space
            out = scale.break_info(rangee)

            # trans'd range
            out['range'] = np.sort(trans.transform(out['range']))

            if limits is None:
                expand = self.expand_default(scale)
                out['range'] = expand_range_distinct(out['range'], expand)

            # major and minor breaks in plot space
            out['major'] = transform_value(trans, out['major'], out['range'])
            out['minor'] = transform_value(trans, out['minor'], out['range'])

            for key in list(out.keys()):
                new_key = '{}_{}'.format(name, key)
                out[new_key] = out.pop(key)

            return out

        out = dict(
            scales=types.SimpleNamespace(x=scale_x, y=scale_y),
            **train(scale_x, self.limits.xlim, self.trans.x, 'x'),
            **train(scale_y, self.limits.xlim, self.trans.y, 'y')
        )
        return out