首页 技术 正文
技术 2022年11月14日
0 收藏 669 点赞 4,617 浏览 1043 个字

vennDiagram包中的主函数绘图时,好像不直接支持PDF格式文件:

dat = list(a = group_out[[1]][,1],b = group_out[[2]][,1])
names(dat) <- group_names[1:2]venn.plot <- venn.diagram(
dat,
filename = "proteinGroup_venn.tiff", #pdf error
imagetype = "tiff", #pdf error
lwd = 3,
col = "transparent",
fill = c("cornflowerblue", "darkorchid1"),
alpha = 0.6,
label.col = "black",
cex = 1.5,
fontfamily = "serif",
fontface = "bold",
cat.col = c("cornflowerblue", "darkorchid1"),
cat.cex = 2,
cat.fontfamily = "serif",
cat.fontface = "bold",
margin = 0.05,
cat.dist = c(0.03, 0.03),
cat.pos = c(-20, 20)
)

直接使用pdf保存矢量图时不行,只能用tiff等其他矢量图格式。但在函数外结合grid.draw可以保存:

venn.plot <- venn.diagram(
dat,
filename = NULL, #设为空
lwd = 3,
col = "transparent",
fill = c("cornflowerblue", "darkorchid1"),
alpha = 0.6,
label.col = "black",
cex = 1.5,
fontfamily = "serif",
fontface = "bold",
cat.col = c("cornflowerblue", "darkorchid1"),
cat.cex = 2,
cat.fontfamily = "serif",
cat.fontface = "bold",
margin = 0.05,
cat.dist = c(0.03, 0.03),
cat.pos = c(-20, 20)
)pdf(file="proteinGroup_venn.pdf")
grid.draw(venn.plot)
dev.off()

如果不行,先安装加载library(grDevices)包。图如下:

Ref:https://stackoverflow.com/questions/14243609/problems-with-venndiagram

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,090
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,567
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,415
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,187
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,824
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,906