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

Before Change


        slope = self.params["slope"]
        intercept = self.params["intercept"]
        pinfo["label"] = self.params["label"]
        if isinstance(x[0], Timestamp):
            ax.set_autoscale_on(False)
            ax.plot(ax.get_xlim(),ax.get_ylim())
        else:

After Change


        ax.set_autoscale_on(False)
        // Get plot limits
        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 
        if np.sum(in_range) > 0:
            x_points = x_points[in_range]
            y_points = y_points[in_range]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

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: craffel/mir_eval
Commit Name: 98d8f98800a76e6809c5ac43245bfe685a5cf436
Time: 2014-04-17
Author: brm2132@columbia.edu
File Name: mir_eval/structure.py
Class Name:
Method Name: pairwise


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 72e8efe6c1acc40f0b4a672a4330813e1a4066e5
Time: 2020-07-24
Author: beat.buesser@ie.ibm.com
File Name: art/attacks/evasion/auto_attack.py
Class Name: AutoAttack
Method Name: _run_attack


Project Name: tensorflow/magenta
Commit Name: e9086f5d37f5f46b8327bf022c7b0c70d42460d1
Time: 2017-03-23
Author: earnest.marshi@gmail.com
File Name: magenta/models/shared/events_rnn_graph.py
Class Name:
Method Name: build_graph