有没有办法在R中右对齐基础(hist)图的主标题?

Att*_*s29 3 plot r

我试图让情节的标题与情节的最右边部分对齐.

为了澄清,在下面的例子中,图的标题与中心对齐.

op <- par(mfrow=c(2, 2))
hist(islands)
utils::str(hist(islands, col="gray", labels = TRUE))
Run Code Online (Sandbox Code Playgroud)

Jou*_*ske 7

对主标题和图形参数adj使用单独的函数:

op <- par(mfrow=c(2, 2))
hist(islands,main=NULL)
title("Histogram of islands",adj=1)
utils::str(hist(islands, col="gray", labels = TRUE,main=NULL))
title("Histogram of islands",adj=1)
Run Code Online (Sandbox Code Playgroud)