Windows上缺少ggplot y标签

时间:2016-03-09 10:28:58

标签: r ggplot2

在运行knitr报告时,我注意到ggplot2 Windows 上生成了没有y-ticks / labels的图表,但是在我的 Linux / Rstudio <上/ em>安装。

以下代码显示了我的问题。

df=data.frame(pos=seq(1,10),data=seq(10,1,-1))
ggplot(data=df, aes(x=pos,y=data))+ 
  scale_y_discrete(breaks=seq(1,10,2))+ 
  geom_line()

以下是我得到的图表:

  

  Windows

     

的Linux   RStudio/Linux

如果我删除了scale_y_discrete函数调用,则会显示中断,但是我需要它来格式化输出。

这是一个环境问题吗?配置问题?

0 个答案:

没有答案