d490edce8fc483707c58e852286950ace7e8cb59,batchflow/utils.py,,show_research,#Any#Any#Any#Any#Any#Any#Any#,132

Before Change


        color = list(mcolors.TABLEAU_COLORS.keys())
    df_len = len(df["config"].unique())
    replace = not len(color) > df_len
    chosen_colors = np.random.choice(color, replace=replace, size=df_len)

    kwargs = {"figsize": (9 * len(layouts), 7), "nrows": 1, "ncols": len(layouts), **kwargs}

    _, ax = plt.subplots(**kwargs)

After Change



    if isinstance(color, str):
        cmap = plt.get_cmap(color)
        chosen_colors = [cmap(i/df_len) for i in range(df_len)]
    else:
        chosen_colors = itertools.cycle(color)

    kwargs = {"figsize": (9 * len(layouts), 7), "nrows": 1, "ncols": len(layouts), **kwargs}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: analysiscenter/batchflow
Commit Name: d490edce8fc483707c58e852286950ace7e8cb59
Time: 2020-07-08
Author: 7520522+a-arefina@users.noreply.github.com
File Name: batchflow/utils.py
Class Name:
Method Name: show_research


Project Name: ContextLab/hypertools
Commit Name: 65106299a6514d849453339381d4cec2aa741268
Time: 2016-12-19
Author: andrew.heusser@gmail.com
File Name: python/examples/hypertools_demo-PPCA.py
Class Name:
Method Name:


Project Name: ContextLab/hypertools
Commit Name: ab58ffb31a31fe93823c2792fa2c0cc779a0ec40
Time: 2016-12-19
Author: andrew.heusser@gmail.com
File Name: python/examples/hypertools_demo-PPCA.py
Class Name:
Method Name: