r 中的罗马斜体标签
我有一个非常简单的脚本:
sens = read.table("Myfile.txt")
library(lattice)
contourplot(sens$V1 ~ sens$V2+sens$V3,data=d3,xlab="U",ylab=expression(kappa))
我一直在尝试以罗马斜体字体获取标签。我认为
font.lab=3, family="serif"
应该给我这个,但无论我尝试什么(font = 3,font =“italic”...)都不会改变字体。
有人能发现我做错了什么吗? 谢谢。
I have a very simple script:
sens = read.table("Myfile.txt")
library(lattice)
contourplot(sens$V1 ~ sens$V2+sens$V3,data=d3,xlab="U",ylab=expression(kappa))
I have been trying to get my labels in roman italic font. I thought
font.lab=3, family="serif"
should give me exactly this but whatever I try (font=3,font="italic"...) just doesn't change the font at all.
Can anybody spot what I'm doing wrong?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试使用
italic
函数和 unicode 符号。You could try the
italic
function and unicode symbols.设置主题将允许您全局更改这些主题。
然后将
par.settings = my.theme
添加到轮廓图语句中Setting up a theme will allow you to change these globally.
Then add
par.settings = my.theme
to the contourplot statement尽管 Triad Sou 的答案在 R Graphics 窗口上有效,但当我尝试使用以下命令以 eps 格式打印绘图时,标签仍然采用非衬线字体:
因此,对于我的 eps 文件,我必须执行以下操作:
Although Triad Sou's answer worked on the R Graphics window, the labels were still in a non-serif font when I tried to print the plot in an eps format with the command:
So for my eps file I had to do: