fdb5900995c0de782b324d62bdc2b6ce00a67e34,examples/api/two_scales.py,,two_scales,#Any#Any#Any#Any#Any#Any#,21

Before Change



    ax1.plot(time, data1, color=c1)
    ax1.set_xlabel("time (s)")
    ax1.set_ylabel("exp")

    ax2.plot(time, data2, color=c2)
    ax2.set_ylabel("sin")

After Change


    
    ax2 = ax1.twinx()  // create a second axes that shares the same x-axis

    for ax, data, c in ((ax1, data1, c1), (ax2, data2, c2)):
        ax.plot(time, data, color=c)
        // Color the y-axis (both label and tick labels)
        ax.yaxis.label.set_color(c)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: matplotlib/matplotlib
Commit Name: fdb5900995c0de782b324d62bdc2b6ce00a67e34
Time: 2018-01-24
Author: vincent.adrien@gmail.com
File Name: examples/api/two_scales.py
Class Name:
Method Name: two_scales


Project Name: scikit-learn/scikit-learn
Commit Name: c3f25168fe8c73b82af8f57ae536f4a9708c863e
Time: 2020-07-06
Author: anaclaramatos@hotmail.com
File Name: sklearn/metrics/_plot/roc_curve.py
Class Name: RocCurveDisplay
Method Name: plot


Project Name: arviz-devs/arviz
Commit Name: 8a99fe2f7460e6ddbc6840f3754993c8cc17df88
Time: 2018-05-21
Author: aloctavodia@gmail.com
File Name: arviz/plots/autocorrplot.py
Class Name:
Method Name: autocorrplot


Project Name: rodluger/starry
Commit Name: 73bf812cc5598a0e6efb20d11de6568a80125a21
Time: 2018-04-29
Author: rodluger@gmail.com
File Name: misc/stability/brgrid.py
Class Name:
Method Name: RMinusOneRPlusOne