0817e41d3d104da9a8e4ffb84d12fd72e5687434,spectral/graphics/spypylab.py,,plot,#Any#Any#,1268

Before Change



    set_mpl_interactive()

    s = np.shape(data)

    if source is not None and hasattr(source, "bands"):
        xvals = source.bands.centers
    else:
        xvals = None

    if len(s) == 1:
        if not xvals:
            xvals = list(range(len(data)))
        p = plt.plot(xvals, data)
    elif len(s) == 2:
        if not xvals:
            xvals = list(range(s[1]))
        p = plt.plot(xvals, data[0, :])
        plt.hold(1)
        for i in range(1, s[0]):
            p = plt.plot(xvals, data[i, :])
    spectral._xyplot = p
    plt.grid(1)
    if source is not None and hasattr(source, "bands"):
        if source.bands.band_quantity is not None:

After Change


    if source is not None and hasattr(source, "bands"):
        xvals = source.bands.centers
    else:
        xvals = list(range(data.shape[-1]))

    if data.ndim == 1:
        data = data[np.newaxis, :]
    data = data.reshape(-1, data.shape[-1])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: spectralpython/spectral
Commit Name: 0817e41d3d104da9a8e4ffb84d12fd72e5687434
Time: 2017-03-26
Author: thomas.boggs@gmail.com
File Name: spectral/graphics/spypylab.py
Class Name:
Method Name: plot


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: richzhang/colorization-pytorch
Commit Name: 1215d2390c0ef900337366e7a89e8d21e4bfd592
Time: 2018-08-25
Author: rzhang88@gmail.com
File Name: test_sweep.py
Class Name:
Method Name: