Skip to content

Support layering aes() multiple times #822

@jdanbrown

Description

@jdanbrown

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions