mtext : 레이아웃이 사용될 때 작은 레이블 설명
-
21-12-2019 - |
문제
라벨 설명에 대해 mtext를 사용하는 것은 XLAB 사용과 다른 것과 다릅니다.XLAB (항상 CEX 인수를 정의하지 않고) XLAB를 사용할 때와 동일한 크기로 Mtext 레이블을 어떻게 할 수 있습니까?CEX= CEX.LAB= 1의 최소한의 예에서.그러나 크기는 다릅니다.
layout(matrix(c(1,1,2,2), ncol=1))
op<-par(mar=c(4,4,2,1))
plot(1:10, xlab="", ylab="", main="This is my title")
mtext("this is the x-axis", side=1, line=2.75, cex=1)
mtext("this is the y-axis", side=2, line=2.5, cex=1)
plot(1:10, xlab="this is smaller", ylab="this is smaller", main="This is my title", cex.lab=1)
par(op)
.
해결책
레이아웃이 사용되면 cex=1
의 plot
의 의미가 다르지만, 활동이 개별 플로팅 영역 외부에 있기 때문에 활동이 맥대로 확장 될 것으로 예상하지 못했습니다.예상되는 요소를 2/3 :
layout(matrix(c(1,1,2,2), ncol=1))
op<-par(mar=c(4,4,2,1))
plot(1:10, xlab="", ylab="", main="This is my title")
mtext("this is the x-axis", side=1, line=2.75, cex=1)
mtext("this is the y-axis", side=2, line=2.5, cex=1)
plot(1:10, xlab="this is _not_ smaller",
ylab="this is _not_ smaller, either",
main="This is my title",
cex.lab=3/2)
par(op)
.
추가 읽기 :
?par # scroll down to mfcol, mfrow
. 제휴하지 않습니다 StackOverflow