96c26bd09d02bb9cddbc083c75ba2ea65b5d377a,plantcv/plantcv/color_palette.py,,color_palette,#Any#,6

Before Change


        (30, 0, 255), (24, 0, 255), (18, 0, 255), (12, 0, 255), (6, 0, 255))

    if num == 1:
        color = rainbow[randrange(0, 255)]
        return [color]
    else:
        dist = int(len(rainbow) / num)
        colors = []

After Change


        // Retrieve the matplotlib colormap
        cmap = plt.get_cmap(params.color_scale)
        // Get num evenly spaced colors
        colors = cmap(np.linspace(0, 1, num), bytes=True)
        colors = colors[:, 0:3].tolist()
        // colors are sequential, if params.color_sequence is random then shuffle the colors
        if params.color_sequence == "random":
            np.random.shuffle(colors)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: danforthcenter/plantcv
Commit Name: 96c26bd09d02bb9cddbc083c75ba2ea65b5d377a
Time: 2020-07-16
Author: noahfahlgren@gmail.com
File Name: plantcv/plantcv/color_palette.py
Class Name:
Method Name: color_palette


Project Name: Kaixhin/Rainbow
Commit Name: 83c9130b8ac6e5cf76fb804282c652343ed2167d
Time: 2018-05-06
Author: design@kaixhin.com
File Name: env.py
Class Name: Env
Method Name: reset


Project Name: commonsense/conceptnet5
Commit Name: 2a437760c9344a20a5785f5b4706950c911534b6
Time: 2015-04-08
Author: rob@luminoso.com
File Name: conceptnet5/formats/sql.py
Class Name: EdgeIndexReader
Method Name: random