lets-plot icon indicating copy to clipboard operation
lets-plot copied to clipboard

Support layering aes() multiple times

Open jdanbrown opened this issue 2 years ago • 0 comments

Bug: using aes() multiple times loses all but the last one

from lets_plot import *
from plotnine.data import mpg

LetsPlot.setup_html()

(
    ggplot(mpg)
    + aes(x='hwy')
    + aes(y='cty')
    + geom_point()
)
image

Using exactly one aes() does the right thing

from lets_plot import *
from plotnine.data import mpg

LetsPlot.setup_html()

(
    ggplot(mpg)
    + aes(x='hwy', y='cty')
    + geom_point()
)
image

Expected behavior (from plotnine)

from plotnine import *
from plotnine.data import mpg

LetsPlot.setup_html()

(
    ggplot(mpg)
    + aes(x='hwy')
    + aes(y='cty')
    + geom_point()
)

image

from plotnine import *
from plotnine.data import mpg

LetsPlot.setup_html()

(
    ggplot(mpg)
    + aes(x='hwy', y='cty')
    + geom_point()
)

image

jdanbrown avatar Jul 19 '23 18:07 jdanbrown