【问题标题】:How to change the size of the legend text in grid_legend command in R?如何更改 R 中 grid_legend 命令中图例文本的大小?
【发布时间】:2015-12-29 16:15:49
【问题描述】:

我正在使用以下命令在我的情节上绘制图例。由于我有 30 多个标签,因此我的一些标签超出了我的情节。我需要知道如何减小我的地块的大小。

grid_legend(0.9, 0.6, pch, col, labels, title="Bacterial Phyla")

我尝试使用cex=1 命令和text.width=0.5 评论。但它没有用。我收到一条错误消息:

"Error in grid_legend(0.9, 0.5, pch, col, labels, text.width = 0.5, title = "Bacterial Class") : 
  unused argument (text.width = 0.5)"

【问题讨论】:

    标签: r fonts size reduce


    【解决方案1】:

    不是最可重复的例子。但是,请尝试使用 par 在图例函数之外设置要更改的 cex 和其他参数,例如 par(cex=2)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 1970-01-01
      • 1970-01-01
      • 2017-08-01
      • 1970-01-01
      • 2021-07-16
      • 2015-10-11
      相关资源
      最近更新 更多