lets-plot
lets-plot copied to clipboard
Allow geom_bar() as a marginal layer
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.
Maybe related to #600