davidsjoberg/ggsankey

Setting Fill Color Breaks Layout

Opened this issue · 0 comments

When plotting an admittedly messy chart with:

ggplot(plotdata,aes(
    x = x, 
    next_x = next_x, 
    node = node, 
    next_node = next_node,
    value=abs(value),
    # fill=as.factor(sign(value)),
    label=node
)) + geom_sankey(size=0) + theme(axis.text.y=element_blank(), axis.text.x=element_blank())

I get a nice chart:
Rplot_good.pdf

But if I uncomment the fill line, suddenly all of the arrangement goes horribly awry:
Rplot_bad.pdf

Tried playing around with color and size as well, and was unable to get around the issue.

I can anonymize and attach the underlying data if that is helpful