0

我是 R 新手,所以请原谅我的无知(1 周后)。我正在尝试生成一个在 y 轴上中断的散点图,以便它从 0 开始,但在 20 开始之前中断(0 到 20 之间没有数据点)我尝试了使用 plotrix 的各种命令(通过经历以前回答的问题),但它不会改变输出图。以下代码生成了一个按照我想要的方式格式化的漂亮图,但我不确定接下来在哪里或做什么,然后在 y 轴上产生中断(可能用 // 表示)。

Age_perception <- ggplot(mydata
                       , aes(x=Age_years, y=Perception)) + 
  coord_cartesian(ylim = c(0, 100))+
  geom_point()+ 
  labs(x='Age in years', y='Perception') + 
  geom_smooth(method=lm, se=FALSE, fullrange=TRUE, col = 'black') + 
  apatheme +  
  theme(text = element_text(size=20)) 
Age_perception
4

0 回答 0