이 코드를 사용하여 막대 플롯을 만들었지 만 예를 들어 x 축의 이름을 종 이름으로 변경하고 싶습니다. 글꼴을 더 작게 만들어서 모두 맞출 수 있도록하고 싶습니다. 다양한 조합의 cex 기능이 있지만 작동하지 않았습니다. 제안에 감사할까요?
count <-
matrix(c(16,102,11,106,15,95,26,87,18,99,21,103,12,110,30,103,10,107,20,87,13,110,17,93), nrow = 2)
barplot(count, beside=T, legend =T, ylim=c(0,130),
col=c("darkolivegreen3", "firebrick1"),
ylab="Frequency (no. of moths)", las = 3,
names = c("tiger\nCo", "tiger\nCr" , "eyes\nCo", "eyes\nCr", "mottled\nCo","mottled\nCr", "pepperL\nCo","pepperL\nCr", "pepperD\nCo","pepperD\nCr", "convol\nCo", "convol\nCr"))
legend(6,130, legend=(c("survived","predated")), pch=c(15,22), cex=0.8, col=c("darkolivegreen3","firebrick1"))
글쎄, ?barplot
페이지 에 따르면 cex.names
논쟁이 있습니다.
barplot(count, beside=T, legend =T, ylim=c(0,130),
col=c("darkolivegreen3", "firebrick1"),
ylab="Frequency (no. of moths)", las = 3,
cex.names=0.8,
names.arg = c("tiger\nCo", "tiger\nCr" , "eyes\nCo", "eyes\nCr",
"mottled\nCo","mottled\nCr", "pepperL\nCo",
"pepperL\nCr", "pepperD\nCo","pepperD\nCr",
"convol\nCo", "convol\nCr"))
legend(6,130, legend=(c("survived","predated")), pch=c(15,22),
col=c("darkolivegreen3","firebrick1"))
나는 올바른 cex. * 인수를 찾는 것이 때때로 어렵고 때로는 축에 대한 별도의 호출이 필요하다는 것을 인정하지만 여기서는 거의 사소한 것 같습니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다