345dbb300b1a35d0f3a7ccc397a6d5a2f1283a73,ggplot/scales/scale_xy.py,scale_position_discrete,limits,#scale_position_discrete#,56

Before Change


    def limits(self):
        if self._limits:
            return self._limits
        elif self.range and not np.isreal(self.range[0]):
            // discrete range
            return self.range
        else:

After Change


        elif isinstance(self.range, list):
            // discrete range
            return self.range
        elif isinstance(self.range, np.ndarray):
            // discrete limits for a continuous range
            mn = int(np.floor(np.min(self.range)))
            mx = int(np.ceil(np.max(self.range)))
            return range(mn, mx+1)
        else:
            GgplotError(
                "Lost, do not know what the limits are.")


// Discrete position scales should be able to make use of the train
// method bound to continuous scales
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: has2k1/plotnine
Commit Name: 345dbb300b1a35d0f3a7ccc397a6d5a2f1283a73
Time: 2015-04-20
Author: has2k1@gmail.com
File Name: ggplot/scales/scale_xy.py
Class Name: scale_position_discrete
Method Name: limits


Project Name: has2k1/plotnine
Commit Name: 8c296338ef19f8327b86865dff3f0079be5b7066
Time: 2014-08-09
Author: lamp.greg@gmail.com
File Name: ggplot/stats/stat_bin.py
Class Name: stat_bin
Method Name: _calculate


Project Name: has2k1/plotnine
Commit Name: 8afc45fa9c6d70f74ce140ef1d1347a33099b8d6
Time: 2016-07-20
Author: has2k1@gmail.com
File Name: ggplotx/positions/position_jitterdodge.py
Class Name: position_jitterdodge
Method Name: setup_params