title: Multiple Venn diagrams in one ".EPS" file in R
body: <p>I want to have two (or more) Venn diagrams in a ".eps" file. I used <a href="https://stackoverflow.com/questions/14243609/problems-with-venndiagram">this post by fridaymeetssunday</a>, which refers to <a href="https://stackoverflow.com/questions/13021863/plots-generated-by-plot-and-ggplot-side-by-side/13022137#13022137">this post by mnel</a>, and I just changed the code from "pdf" to "eps" by postscript.</p>
  
  <p>The problem is, when I run the code and open the file the diagrams are colorless and do not have any colors. Should I have done something else?</p>
  
  <pre><code># libraries
  library(VennDiagram)
  library(grid)
  library(gridBase)
  library(lattice)
  
  # create the diagrams
  temp1 &lt;- venn.diagram(list(B = 1:1800, A = 1571:2020),
      fill = c("red", "green"), alpha = c(0.5, 0.5), cex = 1,cat.fontface = 2,
      lty =2, filename = NULL)
  temp2 &lt;- venn.diagram(list(A = 1:1800, B = 1571:2020),
      fill = c("red", "green"), alpha = c(0.5, 0.5), cex = 1,cat.fontface = 2,
      lty =2, filename = NULL)    
  
  # start new page
  plot.new() 
  #pdf("testpdf", width = 14, height = 7)
  
  postscript("test.eps", height=8, width=8, paper="special", family="Helvetica", fonts=c("serif","Helvetica"), horizontal=FALSE)
  # setup layout
  gl &lt;- grid.layout(nrow=1, ncol=2)
  # grid.show.layout(gl)
  
  # setup viewports
  vp.1 &lt;- viewport(layout.pos.col=1, layout.pos.row=1) 
  vp.2 &lt;- viewport(layout.pos.col=2, layout.pos.row=1) 
  
  # init layout
  pushViewport(viewport(layout=gl))
  # access the first position
  pushViewport(vp.1)
  
  # start new base graphics in first viewport
  par(new=TRUE, fig=gridFIG())
  
  grid.draw(temp2)
  
  # done with the first viewport
  popViewport()
  
  # move to the next viewport
  pushViewport(vp.2)
  
  grid.draw(temp2)
  
  # done with this viewport
  popViewport(1)
  
  dev.off()
  </code></pre>