R linegraph中缺少X轴标签

时间:2016-09-26 22:11:08

标签: r plot axis axis-labels linegraph

我试图让x轴显示每个x标签(即每年),但R会自动省略其中一些标签。我该如何解决这个问题?

years = c(1984, 1985, 1986, 1987, 1988, 1989, 1990, 1991,
          1995, 1996, 1997, 1998, 2000, 2001, 2003, 2005, 2008,
          2012, 2014, 2015, 2016)

abundance = c(308, 53, 43, 59, 74, 320, 29, 1237, 88, 73,
              66, 21, 15, 61, 70, 39, 60, 27, 3, 73, 23)

plot(x=years, y=abundance, type="l", xlab="Years", ylab="Total Abundance", las = 2)

0 个答案:

没有答案