在 R 中使用 LaTeX 语法可以将文字设为斜体。如果要将 "P" 字变为斜体,可以使用以下代码: plot(1:10, main=expression(italic("P"))) 这将在图形标题中显示斜体的 "P" 字。