0

I am trying to create a venn diagram using the VennDiagram package.

VennDiagram::venn.diagram(list(
"Nulliparous to Pregnant"=rownames(top.null.preg), 
"Nulliparous to Parous" = rownames(top.null.par), 
"Nulliparous to Lactating" = rownames(top.null.lac)), 
fill = c("#FF2838","#FFA228", "#36ACFF"), alpha = c(0.5, 0.5, 0.5), 
cex = 2,cat.fontface = 4,lty =2,fontfamily =3, 
filename = "venn_uncor1.tiff")

I cannot produce the graphic, and just keep getting the following error.

Warning message: In dev.off() : No TIFF support in this version of R

Googling turns up nothing helpful for a non-programmer. I've tried changing the filename to .pdf or .jpeg. No effect.

sessionInfo()

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server release 6.8 (Santiago)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] grid      parallel  stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] tiff_0.1-5          VennDiagram_1.6.17  futile.logger_1.4.3 knitr_1.19         
 [5] gplots_3.0.1        kableExtra_0.7.0    visdat_0.1.0        Biobase_2.34.0     
 [9] BiocGenerics_0.20.0 limma_3.30.13       dplyr_0.5.0         purrr_0.2.2        
[13] readr_1.0.0         tidyr_0.6.1         tibble_1.2          ggplot2_2.2.1      
[17] tidyverse_1.1.1     readstata13_0.9.0  

loaded via a namespace (and not attached):
 [1] gtools_3.5.0         reshape2_1.4.2       haven_1.0.0          lattice_0.20-34     
 [5] colorspace_1.3-2     htmltools_0.3.6      viridisLite_0.2.0    yaml_2.1.14         
 [9] foreign_0.8-67       DBI_0.6              lambda.r_1.1.9       modelr_0.1.0        
[13] readxl_0.1.1         plyr_1.8.4           stringr_1.2.0        munsell_0.4.3       
[17] gtable_0.2.0         rvest_0.3.2          caTools_1.17.1       psych_1.6.12        
[21] evaluate_0.10        labeling_0.3         forcats_0.2.0        highr_0.6           
[25] broom_0.4.2          Rcpp_0.12.11         KernSmooth_2.23-15   scales_0.4.1        
[29] backports_1.1.0      gdata_2.18.0         jsonlite_1.3         mnormt_1.5-5        
[33] hms_0.3              digest_0.6.12        stringi_1.1.2        rprojroot_1.2       
[37] tools_3.3.2          bitops_1.0-6         magrittr_1.5         lazyeval_0.2.0      
[41] futile.options_1.0.0 xml2_1.1.1           lubridate_1.6.0      assertthat_0.1      
[45] rmarkdown_1.6        httr_1.2.1           R6_2.2.0             nlme_3.1-131 
Calen
  • 305
  • 4
  • 17
  • I'm not doing anything to get `dev.off()` actually - maybe the package is doing this on its own??! I don't know how these things work. I get the same error if I use `fontfamily = "serif"` – Calen Feb 02 '18 at 00:04
  • I get the same error. It's on a computing cluster for the university, so Linux. – Calen Feb 02 '18 at 01:03
  • I'm not sure what exactly the issue is. You're not able to save your Venn plot as a TIFF file or you can't produce your Venn plot within R, either (without trying to save it as a TIFF)? – 4rj4n Feb 06 '18 at 09:35
  • If you run one or more of the examples on 24-32 of the vignette, does this work? Does it yield a TIFF file? It does for me. For us to be able to work with your own data, I think a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) would be nice, to be able to test your data and code. – 4rj4n Feb 06 '18 at 09:49
  • I am UNABLE to run the venn diagrams in the vignette. It seems this issue is not related to my data so vignette data is sufficient. Thanks for input. – Calen Feb 06 '18 at 20:51
  • 2
    Can you at least draw venn diagrams using the VennDiagram functions that do not save the diagram, but simply draw it in the standard R graphical device? For instance this example: `venn.plot <- draw.triple.venn(area1 = 65, area2 = 75, area3 = 85, n12 = 35, n23 = 15, n13 = 25, n123 = 5, category = c("First", "Second", "Third"), fill = c("blue", "red", "green"), lty = "blank", cex = 2, cat.cex = 2, cat.col = c("blue", "red", "green")` and plot it: `grid.draw(venn.plot)` I chose draw.triple.venn since you seem to want to make a Venn diagram with three sets. – 4rj4n Feb 07 '18 at 09:13
  • 1
    If this works, you can save it making use of grDevices functions: `tiff(filename = "Triple_Venn_diagram.tiff", compression = "lzw"); grid.draw(venn.plot); dev.off()` From there, try to get your own data in this format. – 4rj4n Feb 07 '18 at 09:15
  • This is enough to get me started, and I can work to customize from here. Thank you for your help! – Calen Feb 08 '18 at 06:44
  • This works for me. I saved as a pdf doing `pdf(filename = "Triple_Venn_diagram.tiff");grid.draw(venn.plot);dev.off()` to avoid the TIFF error. Thanks! – i love mistaking Jul 23 '21 at 10:28

0 Answers0