我正在尝试将维恩图的字体更改为arial。
基于此处VennDiagram without group names and with Arial font先前的stackoverflow问题,我尝试将fontfamily =“ arial”添加到代码中,但是没有用。
venn.plot <- draw.quad.venn(
area1 = 72,
area2 = 86,
area3 = 50,
area4 = 52,
n12 = 44,
n13 = 27,
n14 = 32,
n23 = 38,
n24 = 32,
n34 = 20,
n123 = 18,
n124 = 17,
n134 = 11,
n234 = 13,
n1234 = 6,
category = c("Workshops", "STEM Tours", "Summer Apprenticeships",
"Convocation"),
fill = c("antiquewhite4", "cornflowerblue", "gold1", "lightpink2"),
lty = 0, #this gets rid of border
fontfamily ="arial",
cex = 1,
cat.cex = 2,
cat.col = c("antiquewhite4", "cornflowerblue", "gold1", "lightpink2")
);
答案 0 :(得分:0)
在我的系统(Win64)中,安装extrafont
后,您需要运行font_import()
(花一些时间),然后运行loadfonts(device = "win")
。然后,您可以执行类似wf <- windowsFonts()
的操作并浏览wf
。就我而言,我可以使用wf$Arial
来访问Arial,但是可以使用YMMV。另外,请记住,组的名称在cat.fontfamily
参数中。如果您想在Arial中做每件事,
venn.plot <- draw.quad.venn(
area1 = 72,
area2 = 86,
area3 = 50,
area4 = 52,
n12 = 44,
n13 = 27,
n14 = 32,
n23 = 38,
n24 = 32,
n34 = 20,
n123 = 18,
n124 = 17,
n134 = 11,
n234 = 13,
n1234 = 6,
category = c("Workshops", "STEM Tours", "Summer Apprenticeships",
"Convocation"),
fill = c("antiquewhite4", "cornflowerblue", "gold1", "lightpink2"),
lty = 0, #this gets rid of border
fontfamily = wf$Arial,
cex = 1,
cat.cex = 2,
cat.fontfamily = wf$Arial,
cat.col = c("antiquewhite4", "cornflowerblue", "gold1", "lightpink2")
);