a6e3f06dff54fe4f34bf02a81e53852fa95b227d,bokeh/charts/builder/bar_builder.py,BarGlyph,__dodge__,#BarGlyph#Any#,147

Before Change


        [groups[str(bar.source._data["x"])].append(bar) for bar in bars]

        for index, group in groups.iteritems():
            group = sorted(group, key=lambda x: x.source._data["y"][0])
            shift = []
            for i, bar in enumerate(group):
                // save off the top of each rect"s height
                shift.append(group[i].source._data["y"][0] * 2)
                if i > 0:
                    // bar.source._data["y"] = group[i].source._data["y"] + sum(shift[0:i])
                    pass

    @property
    def xmax(self):
        return self.source._data["x"][0] + self.width

After Change



            step = np.linspace(0, 1.0, len(groups.keys()) + 1, endpoint=False)

            width = min(0.2, (1. / len(groups.keys())) ** 1.1)

            for i, (index, group) in enumerate(groups.iteritems()):
                for bar in group:
                    bar.source._data["x"][0] = bar.source._data["x"][0] + ":" + str(step[i + 1])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: bokeh/bokeh
Commit Name: a6e3f06dff54fe4f34bf02a81e53852fa95b227d
Time: 2015-08-30
Author: nroth@dealnews.com
File Name: bokeh/charts/builder/bar_builder.py
Class Name: BarGlyph
Method Name: __dodge__


Project Name: caserec/CaseRecommender
Commit Name: fe2c2074017588c09f7f213d97765dbef1623bde
Time: 2016-06-16
Author: fortes.arthur@gmail.com
File Name: utils/read_file.py
Class Name: ReadFile
Method Name: rating_prediction


Project Name: biolab/orange3
Commit Name: 9ed75dc6c05a67c3788698e9f9eab12a300d7bad
Time: 2015-11-13
Author: ales.erjavec@fri.uni-lj.si
File Name: Orange/widgets/visualize/owheatmap.py
Class Name: OWHeatMap
Method Name: __init__