假设我有以下data.frame:
structure(list(x = c("item_1", "item_2", "item_3", "item_4"),
y = c("location_1", "location_2", "location_3", "location_4"
)), class = "data.frame", row.names = c(NA, -4L))
########################
# x y
#1 item_1 location_1
#2 item_2 location_2
#3 item_3 location_3
#4 item_4 location_4
具有以下情节:
data %>% ggplot(aes(x,y)) + geom_point()
是否可以将所有四个标签保留在y轴上,但仅显示location_4和location_1的刻度线?