def _init_views(self, min_value, max_value):
        if not self.base_size:
            return []
        min_value, max_value = min_value or 0, max_value or 0
        views = []
        for view, bins in [
                ("Square Root Choice",
                 int(math.ceil(math.sqrt(self.base_size)))),
                ("Sturges Formula",
                 int(math.ceil(math.log(self.base_size, 2) + 1))),
                ("Rice Rule",
                 int(math.ceil(2 * self.base_size ** (1.0 / 3))))]:
            bin_width = float(max_value - min_value) / bins
            x_axis = [min_value + (bin_width * x) for x in range(1, bins + 1)]
            views.append({"view": view, "bins": bins,
                          "x": x_axis, "y": [0] * len(x_axis)})
        return views
Search in self.environ for additional user defined attributes.
dataset/ETHPy150Open openstack/rally/rally/task/processing/charts.py/HistogramChart._init_views--crossover with--dataset/ETHPy150Open adampresley/bottlepy-bootstrap/app/bottle.py/BaseRequest.__getattr__