With a little mess, you can get to something workable.
sloc <- stars(u,len=0.6,lwd=2, col.lines=1:10)
Map(
function(x,y) stars(
matrix(1,ncol=10,nrow=6),key.loc=c(x,y),
key.labels=colnames(u),add=TRUE, lty=3, cex=0.7, len=0.6
),
sloc$Var1, sloc$Var2
)
Result:

You can delete the entire row for each segment by specifying lty=0, but this leaves numbers floating out of space is not easy.
source
share