vennDiagram main function drawing package, it does not seem to directly support PDF format:
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)
)
Not when pdf save vector used directly only with other vector formats such as tiff. However, the outer grid.draw binding function can be saved:
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()
If not, install the loaded library(grDevices)
package. FIG follows:
Ref:https://stackoverflow.com/questions/14243609/problems-with-venndiagram