I am using the riverplot
package in R. I am able to make a Sankey diagram. I would like to be able to add a vertical label (preferably on the bottom). I found one example that appears to do this: http://www.statsmapsnpix.com/2016/08/research-with-qgis-r-and-speaking-to.html (I am referring to Figure 20, near the top - labels like 2004
and 2015
are what I am trying to figure out how to create).
How can I do this myself?
Here is a MWE, taken directly from the package documentation at https://cran.r-project.org/web/packages/riverplot/riverplot.pdf
library(riverplot)
nodes <- c( LETTERS[1:3] )
edges <- list( A= list( C= 10 ), B= list( C= 10 ) )
r <- makeRiver( nodes, edges, node_xpos= c( 1,1,2 ),
node_labels= c( A= "Node A", B= "Node B", C= "Node C" ),
node_styles= list( A= list( col= "yellow" )) )
plot( r )
Here, I would like to have a label under Node A
and Node B
called Left
and another label under Node C
called Right
.