当我使用便利功能时,我无法获得minor_breaks
做任何事情的论据scale_x_reverse
df <- data.frame(x=c(10,20,40,90,300),y=c(1,2,7,2,7)) #define data frame
# scale_x_continuous uses minor_breaks just like it should
ggplot(df, aes(x,y)) + geom_line() +
scale_x_continuous(breaks=c(10,50,100,150,200,250,300), minor_breaks=10:300)
# scale_x_reverse seems to ignore the minor_breaks option
ggplot(df, aes(x,y)) + geom_line() +
scale_x_reverse(breaks=c(10,50,100,150,200,250,300), minor_breaks=10:300)
有什么方法可以反转 X 轴但仍然可以自定义小中断?