Closed epo071 closed 7 years ago
At this moment alluvial
has hardcoded mar
option of par()
. You can't change it through the arguments. Perhaps it can be exposed as one of the arguments...
Until then, if you need larger margins you may try embedding the result of alluvial in a larger device e.g. with layout()
:
library(alluvial)
tit <- as.data.frame(Titanic)
# defaults
tit2d <- aggregate( Freq ~ Class + Survived, data=tit, sum)
alluvial( tit2d[,1:2], freq=tit2d$Freq, xw=0.0, alpha=0.8,
gap.width=0.1, col= "steelblue", border="white",
layer = tit2d$Survived != "Yes" )
# larger margins
m <- matrix(2, ncol=3, nrow=3)
m[2,2] <- 1
layout(m, widths=c(1,8,1), heights=c(1,8,1))
alluvial( tit2d[,1:2], freq=tit2d$Freq, xw=0.0, alpha=0.8,
gap.width=0.1, col= "steelblue", border="white",
layer = tit2d$Survived != "Yes" )
can alluvial take over par() setting of margins ?