坐山雕

导航

ggplot2: display every nth value on discrete axis

every_nth = function(n) { return(function(x) {x[c(TRUE, rep(FALSE, n - 1))]}) } ggplot(mpg, aes(x = class, y = cyl)) + geom_point() + scale_x_discrete

posted on 2021-05-07 20:12  坐山雕  阅读(41)  评论(0编辑  收藏  举报