坐山雕

导航

pretty break

scale_x_continuous( breaks = pretty_breaks(10),labels=scales::comma)+

x <- 1:4
y <- c(0, 0.0001, 0.0002, 0.0003)

dd <- data.frame(x, y)

scientific_10 <- function(x) {
parse(text=gsub("e", " %*% 10^", scales::scientific_format()(x)))
}

ggplot(dd, aes(x, y)) + geom_point()+scale_y_continuous(label=scientific_10)

labels=unit_format(unit = "k", scale = 1e-3, sep = “")
labels=unit_format(unit = “M", scale = 1e-6, sep = "")

posted on 2021-04-28 11:18  坐山雕  阅读(71)  评论(0编辑  收藏  举报