r - 有没有办法在 R 中右对齐基本(历史)图的主标题?

标签 r plot

我正在尝试让绘图的标题与绘图的最右侧部分对齐。

为了澄清,在下面的示例中,绘图的标题与中心对齐。

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

最佳答案

对主标题和图形参数 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)

关于r - 有没有办法在 R 中右对齐基本(历史)图的主标题?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15098086/

相关文章:

r - 通过 ggplot2 中的值对的平均颜色线

r - 如何在facet_grid中指定列或如何更改facet_wrap中的标签

r - quantmod getFinancials() 不提取财务数据

r - 安装软件包 R (Ubuntu)

r - 绘制名称为 x 刻度的数字向量

matlab - 用点划线和虚线绘制问题 : How to modify default linestyles for better use with vector renderer 'painters' ?

python - 如何将权重传递给 Seaborn FacetGrid

r - 设置 sepwidth heatmap.2 (gplots)

带网格的 Python SAC 图

python - 如何用 python 绘制 x y 线图?