需要轴标题标记为“δ13C(‰)”,但13要作为上标。

huangapple go评论107阅读模式
英文:

Need axis title labeled "δ13C (‰)" but with the 13 as a superscript

问题

我在寻找正确的代码来在轴标题中包含上标。我需要轴标题标为"δ13C (‰)",但13要作为上标显示在字母C的前面。

yaxis <- expression("δ^13*C "(‰)")

英文:

I'm having issues finding the right code to include a superscript in my axis title. I need the axis title labeled "δ13C (‰)" but with the 13 as a superscript on the letter C at the front of the letter.

yaxis &lt;- expression(&quot;&quot;δ^13*C &quot;(‰)&quot;)

I have tried many combinations but above is the code I have right now and it is not working.

答案1

得分: 1

"如常,?plotmath 包含了使其工作的咒语。例如:

yaxis &lt;- expression(delta^13*C ~ &quot;\U2030&quot;)
plot(1, ylab=yaxis)

需要轴标题标记为“δ13C(‰)”,但13要作为上标。

大部分内容都是不言自明的(例如,delta 在表达式中写入 δ),但供参考,千分号 字符的 Unicode 字符可以在 Windows 字符映射中找到,并使用 \U 表示:

&quot;\U2030&quot;
[1] &quot;‰&quot;
英文:

As always, ?plotmath has the incantations to get this to work. E.g.:

yaxis &lt;- expression(delta^13*C ~ &quot;\U2030&quot;)
plot(1, ylab=yaxis)

需要轴标题标记为“δ13C(‰)”,但13要作为上标。

Most of this is self-explanatory (e.g. delta writes a δ in an expression), but for reference, the unicode character for the per mille character can be found in the Windows Character Map, and referenced with the \U notation:

&quot;\U2030&quot;
[1] &quot;‰&quot;

huangapple
  • 本文由 发表于 2023年6月9日 09:18:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/76436607.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定