ggplot2将文本自动居中在geom_text图层中。例如: library(ggplot2)
library(tidyverse)
df <- data_frame(text = c("A short sentence.",
"A slightly longer sentence.",
"This sentence is the longest of
我是R中的新手,我想使用条形图和ggplot将数据可视化。 我有下面的数据,当我想要查看这些数据时,负值的文本不会显示在Bar下面。 dat <- read.table(text = "sample Types Value
sample1 A -36
sample2 B 31
sample1 C 15
sample2 D -12
sample1 E 27
sample2 F 16
s