【问题标题】:Poorly typeset μ symbol in plotmathplotmath 中的 μ 符号排版不良
【发布时间】:2021-07-03 11:21:57
【问题描述】:

在基础 R 中使用默认字体 (sans) 时,像 μ 这样的符号排版效果不佳:

plot(1, xlab = bquote("I want sans font here, but serif font for:" ~ (mu * g)))

g 看起来比 μ 符号大。

将字体系列设置为 serif 会有所改善:

par(family = "serif)
plot(1, xlab = bquote("I want sans font here, but serif font for:" ~ (mu * g)))

仍然不完美,但更接近。

  • 如果我希望文本为sans,是否可以更改符号的字体系列中间句?
  • 如果没有,有没有更好的方法在plot中排版μg?

【问题讨论】:

  • 检查ragg 包....可能会有所帮助。
  • @Roman 哇,这是我一直在寻找的东西,谢谢!

标签: r plot fonts plotmath typesetting


【解决方案1】:

如果没有,有没有更好的方法在plot中排版μg

事实证明,确实有一种更简单的方法来获得更好的排版符号:

plot(1, xlab = "It turns out you can just use the character μ directly")

如果你用正确的编码保存(这里我使用了UTF-8),很多符号可以直接在R代码中使用,并且会被正确打印。

我希望这个答案对其他人有用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-05-09
    • 2021-10-03
    • 2013-06-04
    • 1970-01-01
    • 2021-11-18
    • 1970-01-01
    • 1970-01-01
    • 2015-05-31
    相关资源
    最近更新 更多