XLIM我有我的数据如下:R:列标题ylim和行的名称用作R
Date Medicine1 Medicine2 Medicine3 Medicine4
2014-01-01 0.986 0.897 0.765 0.566
2014-02-01 0.989 0.888 0.778 0.587
2014-03-01 0.991 0.867 0.788 0.565
2014-04-01 0.982 0.883 0.771 0.532
2014-05-01 0.995 0.873 0.799 0.588
我使用matplot()函数来绘制上述数据。以下是我的代码:
med_temp = as.matrix(Medicine[,2:(length(Medicine[1,]))])
matplot(med_temp, type = c("b"), pch = 1, col = 2:(length(Medicine[1,])))
以下是剧情:
我想列标题为ylim和日期列XLIM。我试过使用
ylim = as.vector("Medicine1","Medicine2","Medicine3","Medicine4") and
ylim = c("Medicine1","Medicine2","Medicine3","Medicine4")
这两个都给我错误。我该如何获得我想要的格式?有没有办法做到这一点?
在此先感谢您的帮助
真实数据:
Month Retention1 Diff
Month1 100.0 0.0
Month2 95.5 -4.5
Month3 90.6 -4.9
Month4 85.9 -4.7
Month5 82.0 -3.9
你的意思'xlab'和'ylab'? – 2014-09-22 22:54:36