如何使两个字符串的顶部在绘图上对齐?
library(stringr)
arep <- rep('a', 17) %>%
str_c(collapse = "\n")
brep <- rep('b', 10) %>%
str_c(collapse = "\n")
plot.new()
text(x = .5, y = .5, labels = arep)
text(x = .4, y = .5, labels = brep)发布于 2018-06-21 15:05:01
至少这会起作用,尽管它是一种变通的方法:
arep <- rep('a', 17) %>%
str_c(collapse = "\n")
brep <- c(rep('b', 10), rep("", 7)) %>%
str_c(collapse = "\n")
plot.new()
text(x = .5, y = .5, labels = arep)
text(x = .4, y = .5, labels = brep)https://stackoverflow.com/questions/50962042
复制相似问题