您好,登錄后才能下訂單哦!
這篇文章主要介紹R語(yǔ)言中colors()的顏色有哪些,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
R進(jìn)行繪圖多會(huì)涉及顏色搭配問(wèn)題,利用colors()可以獲得R種的657種顏色名稱(chēng)。 head(colors(),20) [1] "white" "aliceblue" "antiquewhite" "antiquewhite1" [5] "antiquewhite2" "...
R進(jìn)行繪圖多會(huì)涉及顏色搭配問(wèn)題,利用colors()可以獲得R種的657種顏色名稱(chēng)。
head(colors(),20) [1] "white" "aliceblue" "antiquewhite" "antiquewhite1" [5] "antiquewhite2" "antiquewhite3" "antiquewhite4" "aquamarine" [9] "aquamarine1" "aquamarine2" "aquamarine3" "aquamarine4" [13] "azure" "azure1" "azure2" "azure3" [17] "azure4" "beige" "bisque" "bisque1"
每個(gè)顏色名稱(chēng)具體對(duì)應(yīng)的顏色,可以通過(guò)繪圖呈現(xiàn)出來(lái)
pdf(file = "RColors.pdf",height = 20,width = 30) par(mar=c(0,0,0,0)) plot(0, 0, type = "n", xlim = c(0, 1), ylim = c(0, 1), axes = FALSE, xlab = "", ylab = "") line=30 col=22 rect( rep((0:(col - 1)/col),line) , sort(rep((0:(line - 1)/line),col),decreasing=T) , rep((1:col/col),line) , sort(rep((1:line/line),col),decreasing=T), border = "light gray" , col=colors()[seq(1,line*col)]) text( rep((0:(col - 1)/col),line)+0.02 , sort(rep((0:(line - 1)/line),col),decreasing=T)+0.015 , colors()[seq(1,line*col)] , cex=0.9) dev.off()
以上是“R語(yǔ)言中colors()的顏色有哪些”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注億速云行業(yè)資訊頻道!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。