我用R的格子包來想像一個矩陣以獲得10x10格子。R:格子函數中的傳說
不幸的是,我在調節時遇到了一些問題。
色條需要一個說明標題(垂直書寫)。
下面是一個示例代碼,以查看它現在的外觀如何加上圖片。
library(lattice)
#Build the horizontal and vertical axis information
hor=c("0.0005", "0.001", "0.005", "0.01", "0.05", "0.1", "0.5", "1", "5", "10")
ver=c("1000","2000","3000","4000","5000","6000","7000","8000","9000","10000")
nrowcol=length(ver)
cor = matrix(runif(nrowcol*nrowcol, min=0.4), nrow=nrowcol, ncol=nrowcol, dimnames = list(hor, ver))
for (i in 1:nrowcol) cor[i,i] = 1
rgb.palette <- colorRampPalette(c("blue", "yellow"), space = "rgb")
levelplot(cor, col.regions=rgb.palette(120), cuts=100, at=seq(0,1,0.01),
xlab=expression("DAG depletion rate k"[B49] *" [ s"^"-1"*" ]"),
ylab=expression("PKC activation rate k"[D5] *" [ l/(mol*s) ]"))
您是否猜測我如何解決這些小問題?
非常感謝你!