答案 0 :(得分:2)
尝试一下:
library(tidyverse)
library(wrapr)
deneme %.>%
ggplot(., aes(
xmin = id - .45,
xmax = id + .45,
ymin = end,
ymax = start,
fill = type
)) +
geom_rect() +
scale_x_continuous(
breaks = .$id,
labels = .$desc
) +
theme(axis.text.x = element_text(angle = 45, hjust = 1))