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

Allow geom_bar() as a marginal layer

Open ASmirnov-HORIS opened this issue 2 years ago • 1 comments

Example:

data = {
    'x': ["a", "a", "b", "b"],
    'y': ["f", "g", "g", "g"],
}
ggplot(data, aes('x', 'y')) + \
    geom_count() + \
    ggmarginal('r', layer=geom_bar())

Output:

Internal error: IllegalStateException : Not a collections of Double(s)

Can be fixed by adding orientation='y' into the geom_bar().

It seems that the ability to add discrete geoms as marginal layers was overlooked, but with the introduction of geom_count() it makes sense.

ASmirnov-HORIS avatar Dec 21 '23 15:12 ASmirnov-HORIS

Maybe related to #600

alshan avatar Dec 29 '23 20:12 alshan