楔形运算符显然不包含在 R?plotmath功能中。您可以使用 Unicode 符号执行此操作,尽管它可能对您系统上可用的字体/特定输出格式敏感。(为了找出合适的代码,我在网上搜索了“Unicode wedge”并找到了例如维基百科页面;另见此处)
png("wedge.png")
plot(0:1,0:1, type="n", ann=FALSE,axes=FALSE)
text(0.5, 0.5, "A \u2227 B", cex=5)
dev.off()
Run Code Online (Sandbox Code Playgroud)
如果您想使用成熟的 LaTeX 解决方案,您可以使用以下tikzDevice软件包:
library(tikzDevice)
tikz("wedge.tex", standAlone = TRUE)
plot(0:1,0:1, type="n", ann=FALSE,axes=FALSE)
text(0.5, 0.5, "$A \\wedge B$", cex=5)
dev.off()
system("pdflatex wedge; pdfcrop wedge.pdf; convert wedge-crop.pdf wedge2.png")
Run Code Online (Sandbox Code Playgroud)