dcceebd05be7ae476b8a8f409f9bc720568f6633,plotnine/tests/test_ggplot_internals.py,,test_calculated_aes,#,146

Before Change



    assert _strip(mapping1["y"]) == "density"
    assert _strip(mapping2["y"]) == "density*2"
    assert _strip(mapping3["y"]) == "density + count"
    assert _strip(mapping4["y"]) == "func(density)"

    df = pd.DataFrame({"x": [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]})
    p = ggplot(df) + geom_bar(aes(x="x", fill="stat(count + 2)"))

After Change


    _test()

    df = pd.DataFrame({"x": [1, 2, 2, 3, 3, 3, 4, 4, 4, 4]})
    p = ggplot(df) + geom_bar(aes(x="x", fill=after_stat("count + 2")))
    p.draw_test()

    p = ggplot(df) + geom_bar(aes(x="x", fill="stat(count + 2)"))
    p.draw_test()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: has2k1/plotnine
Commit Name: dcceebd05be7ae476b8a8f409f9bc720568f6633
Time: 2020-12-01
Author: has2k1@gmail.com
File Name: plotnine/tests/test_ggplot_internals.py
Class Name:
Method Name: test_calculated_aes


Project Name: has2k1/plotnine
Commit Name: bd26ba3c4ec91742376870736b088de2412ed8ee
Time: 2016-07-17
Author: has2k1@gmail.com
File Name: ggplot/tests/test_geom.py
Class Name:
Method Name: test_geom_basics


Project Name: has2k1/plotnine
Commit Name: d29a72a2f206ec79c5311e45687d1318dec809eb
Time: 2013-12-06
Author: jasc@gmx.net
File Name: ggplot/tests/test_basic.py
Class Name:
Method Name: test_facet_grid