문제

라벨 설명에 대해 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=1plot의 의미가 다르지만, 활동이 개별 플로팅 영역 외부에 있기 때문에 활동이 맥대로 확장 될 것으로 예상하지 못했습니다.예상되는 요소를 2/3 :

을 반전시켜 "효과적인"-GeneraCodeTagcode 내부의 "효과적인"의 기본 감소를 역전시킬 수 있습니다.
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
.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top