R graphs: Creating Tufte's horizontal bar lines

前端 未结 3 675
礼貌的吻别
礼貌的吻别 2020-12-14 02:39

How can we replicate Tufte\'s implicit horizontal lines in R?

\"Tufte

For example, the following

3条回答
  •  悲&欢浪女
    2020-12-14 03:33

    There's also a pretty easy base R solution for this:

    tmp <- table(msleep$order)
    barplot(tmp, col='black', las=3)
    abline(h=seq(5, max(tmp), by=5), col='white', lwd=2)
    

    enter image description here

提交回复
热议问题