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

Before 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]

After Change


        xlim = ax.get_xlim()

        _x = np.array([np.min(xlim), np.max(xlim)])
        for i in range(len(slope)):
            _y = _x * slope[i] + intercept[i]
            ax.plot(_x, _y,
                    linewidth=linewidth[i],
                    linestyle=linestyle[i],
                    alpha=alpha[i],
                    color=color[i])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: has2k1/plotnine
Commit Name: d695f661f194ba222386ac4848ac259814de3e49
Time: 2014-04-29
Author: has2k1@gmail.com
File Name: ggplot/geoms/geom_abline.py
Class Name: geom_abline
Method Name: _plot_unit


Project Name: openai/baselines
Commit Name: b71152eea0470ac2629c33e0fc66a54fe494949f
Time: 2018-02-26
Author: matthiasplappert@me.com
File Name: baselines/common/vec_env/dummy_vec_env.py
Class Name: DummyVecEnv
Method Name: step_wait


Project Name: biocore/scikit-bio
Commit Name: dc682236d6f167f733d65057c4faa07a20e32d04
Time: 2014-01-02
Author: jai.rideout@gmail.com
File Name: bipy/core/distance.py
Class Name: DistanceMatrix
Method Name: from_file