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

Before Change


        xlim = ax.get_xlim()
        ylim = ax.get_ylim()
        // Determine line function
        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 

After Change


        _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: 4

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: suavecode/SUAVE
Commit Name: 4233250171080006377b8226799730b51723e183
Time: 2019-03-19
Author: mclarke2@stanford.edu
File Name: trunk/SUAVE/Plots/Mission_Plots.py
Class Name:
Method Name: plot_flight_conditions


Project Name: pymc-devs/pymc3
Commit Name: 4858a3da74bc14eeaf724c9896bfe77df9451548
Time: 2007-09-13
Author: anand.prabhakar.patil@15d7aa0b-6f1a-0410-991a-d59f85d14984
File Name: PyMC2/tests/test_norm_approx.py
Class Name: test_norm_approx
Method Name: check_draws