# NOT RUN {
nodes <- data.frame(ID=c("A","B"), x=1:2, y=0)
flows <- data.frame(from="A", to="B", quantity=10, substance="stuff")
sankey(nodes, flows)
colors <- data.frame(substance="stuff", color="blue")
sankey(nodes, flows, colors)
sankey(nodes, flows, legend=TRUE) # Plots default legend
sankey(nodes, flows, legend=grid::gpar(fontsize=18, ncols=2)) # Large fonts; 2 columns
# }
Run the code above in your browser using DataLab