The following is equivalent:
set.seed(1) xx = rbinom(10, size=10, prob=.5) barplot(t(table(xx)), horiz=T)

For even more similar ones:
set.seed(1) xx = rnorm(10) xxch = as.character(xx) ff = sapply(strsplit(xxch, '\\.'), function(x) x[1]) ss = sapply(strsplit(xxch, '\\.'), function(x) x[2]) first = sapply(strsplit(ss, ''), function(x) x[1]) second = sapply(strsplit(ss, ''), function(x) x[2]) third = sapply(strsplit(ss, ''), function(x) x[3]) dd = data.frame(ff, first, second, third) dd = cbind(dd[1], sapply(dd[-1], as.numeric)) ddt = data.table(dd) gg = ddt[order(ff,first)][,paste(first, collapse=""),by=ff] gg$rr = rownames(gg) ggplot(gg)+geom_text(aes(x=rr, y=1, label=paste(ff,'|',V1))) + theme(axis.text = element_blank(),axis.title = element_blank(), axis.ticks=element_blank()) + coord_flip()+ labs(title="Decimal is at |")

Perhaps the code may be changed for different sets.
Using capture.output (as suggested by @Greg) and plotting with ggplot:
tmp <- capture.output(stem(iris$Petal.Length)) stemdf = data.frame(tmp, rr=1:length(tmp)) ggplot(stemdf)+ geom_text(aes(x=rr, y=0, label=tmp), hjust=0) + coord_flip()+ theme_classic() + scale_x_discrete(breaks=NULL)+ scale_y_discrete(breaks=NULL, limits=c(0,1))+ theme(axis.text = element_blank(), axis.title = element_blank(), axis.ticks=element_blank(), panel.grid=element_blank(), axis.line=element_blank())
