0
我現在用的是以下幾行,以產生兩個4X10矩陣D1的行下面的情節,和D2在一個圖表:分配標籤只在劇情有些數據點
plot(as.matrix(d1[2,]), as.matrix(d2[2,]), type="o", col="firebrick", ann=FALSE, pch=17, log = 'y',lty=4, xaxt = "n", yaxt="n", las=2, ylim = c(50, 2e6))+
lines(as.matrix(d1[1,]),as.matrix(d2[1,]), type="o", col="deepskyblue", ann=FALSE, pch=15, lty=4)+
lines(as.matrix(d1[3,]),as.matrix(d2[3,]), type="o", col="darkorange", ann=FALSE, pch=18, lty=4)+
lines(as.matrix(d1[4,]),as.matrix(d2[4,]), type="o", col="lawngreen", ann=FALSE, pch=16, lty=4)
x_axis_range <- c(0, 1, 2, 4, 6, 8, 10, 12, 14)
axis(1,at = x_axis_range, labels = x_axis_range)
axis(1,at = x_axis_range, labels = x_axis_range)
y_axis_range <- c(1e+2, 4e+2, 1e+3, 5e+3, 3e+4, 2e+5, 5e+5, 2e+6)
y_axis_labels <- c("100", "400", "1K", "5K", "30K", "200K", "500", "2M")
axis(2,at = y_axis_range, labels = y_axis_labels, las=2)
而且它產生的下圖:
有沒有一種方法來標記第一個和最後數據點,每行一個任意標籤(即「F」和「L」)?