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