b8f8bbb6e8f5480174c4c49445bc0e7d952f3946,ggplot/geoms/geom_abline.py,geom_abline,_plot_unit,#geom_abline#Any#Any#,16

Before Change


            ax.set_autoscale_on(False)
            ax.plot(ax.get_xlim(),ax.get_ylim())
        else:
            start, stop = np.max(x), np.min(x)
            step = ((stop-start))  / 100.0
            x_rng = np.arange(start, stop, step)
            y_rng = x_rng * slope + intercept
            ax.plot(x_rng, y_rng, **pinfo)

After Change


        line_func = lambda x: x*slope + intercept
        // Get "x" points within limit and map to "y" coordinates
        x_points = np.linspace(min(xlim),max(xlim),100)
        y_points = np.array(map(line_func,x_points))
        // detemine which points are still within the limit of the plot
        in_range = np.logical_and(y_points > min(ylim),
                                  y_points < max(ylim))
        // If some points are withinn the plot draw them on 
        if np.sum(in_range) > 0:
            x_points = x_points[in_range]
            y_points = y_points[in_range]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: has2k1/plotnine
Commit Name: b8f8bbb6e8f5480174c4c49445bc0e7d952f3946
Time: 2014-04-25
Author: eric.chiang.m@gmail.com
File Name: ggplot/geoms/geom_abline.py
Class Name: geom_abline
Method Name: _plot_unit


Project Name: etal/cnvkit
Commit Name: 29db4abdbeb839340ac5b0caf934ebda93892934
Time: 2017-02-24
Author: eric.talevich@gmail.com
File Name: scripts/coverage_bin_size.py
Class Name:
Method Name: print_table


Project Name: miso-belica/sumy
Commit Name: c0a5504ce6ff8a850eabd5a33488ccf535a55b4f
Time: 2013-05-21
Author: miso.belica@gmail.com
File Name: sumy/summarizers/edmundson_key.py
Class Name: EdmundsonKeyMethod
Method Name: _compute_significant_words