329dfcea129f72eb3ea741dfc343d4c28c513c69,ggplot/ggplot.py,ggplot,_get_layers,#ggplot#Any#Any#,388

Before Change


            // We want everything to be a DataFrame. We"re going to default
        // to key to handle items where the user hard codes a aesthetic
        // (i.e. alpha=0.6)
        mapping = pd.DataFrame({
            ae: data.get(key, key)
            for ae, key in aes.items()
        })
        if "color" in mapping:
            mapping["color"] = data["color_mapping"]
        if "size" in mapping:
            mapping["size"] = data["size_mapping"]

After Change


                // string values.
                extra[ae] = key
        mapping = pd.DataFrame(mapping)
        for ae, key in extra.items():
            mapping[ae] = key

        // Overwrite the already done mappings to matplotlib understandable
        // values for color/size/etc
        if "color" in mapping:
            mapping["color"] = data["color_mapping"]
        if "size" in mapping:
            mapping["size"] = data["size_mapping"]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 8

Instances


Project Name: has2k1/plotnine
Commit Name: 329dfcea129f72eb3ea741dfc343d4c28c513c69
Time: 2014-02-06
Author: jasc@gmx.net
File Name: ggplot/ggplot.py
Class Name: ggplot
Method Name: _get_layers


Project Name: wkentaro/labelme
Commit Name: 448bd4a78699766aea66231ba442b8b5826d2a05
Time: 2019-05-15
Author: www.kentaro.wada@gmail.com
File Name: labelme/widgets/label_dialog.py
Class Name: LabelDialog
Method Name: resetFlags


Project Name: mynlp/ccg2lambda
Commit Name: 5b5d9a9aedf8e11b9609d28b26b6488bc20cb08b
Time: 2017-03-24
Author: pascual@nii.ac.jp
File Name: scripts/semantic_types.py
Class Name:
Method Name: merge_dynamic_libraries


Project Name: allenai/allennlp
Commit Name: 7ef6adf2462b1f3617ca5e97fde642880179050d
Time: 2017-09-15
Author: joelgrus@gmail.com
File Name: allennlp/service/server_sanic.py
Class Name:
Method Name: run


Project Name: pyprob/pyprob
Commit Name: a277fd89980f7a4647d0a17548aba7df37a5aefb
Time: 2018-09-19
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network_feedforward.py
Class Name: InferenceNetworkFeedForward
Method Name: infer_trace_init