Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7555845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:43:03+00:00 2026-05-30T11:43:03+00:00

I have been working on Venn Diagrams in GNU R. I have tried using

  • 0

I have been working on Venn Diagrams in GNU R. I have tried using the packages venneuler and VennDiagram. I find that VennDiagram has a lot more granular control, but it seems to lack the documentation to fill in all the details. The closest I can find is this PPT file.
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3041657/bin/1471-2105-12-35-S4.PPT which I found from the URL: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC3041657/

Here are my issues with using VennDiagram.

For the code

require(VennDiagram)
venn.diagram(list(B = 1:2000, A = 200:400),fill = c("yellow", "blue"), 
alpha = c(0.8, 0.8), cex =1.5, cat.pos=0, cat.fontface = 4,
lty = 1, fontfamily =3, filename = "test001.jpeg");

(I had an image here, but since I am new I do not have rights to post the image. Please generate the image from the code above.)

I can make a subset (hence a circle within a circle). But I am not finding a way to do the following:

  1. Make BC to show as the equal of B^C. No, a literal “B^C” does not work. I would think there is a way to relabel the sets in a different property, but I have not seen a way to do it.
  2. To position the labels of B^C and A^C within the sets and not on the outside as currently shown. I tried cat.pos=”inner” but that way not a valid property. I also tried cat.pos=c(0,0) in the hope that I could feed it as an X,Y where X & Y are from the center of the circle, but it did not produce any different results.

Thanks to DWin, here is the code to complete my diagram to the exercise.
Suppose that A ⊂ B. Show that Bc ⊂ Ac.

require(VennDiagram)
plot.new()
venn.plot <- venn.diagram(
x = list(B = 1:200, A = 20:40), category.names= expression(B, A), 
          fill = c("yellow", "blue"), alpha = c(0.8, 0.8), cex =1.5, 
          cat.pos=0, cat.dist=c(-.1, -.1),  filename = NULL) ;
grid.draw(venn.plot); # grid graphic requires explicit print or draw operation
grid.text(expression(B^c),x=0.2,y=0.95)
grid.text(expression(A^c),x=0.16,y=0.95)
grid.text(expression(A^c),x=0.16,y=0.75)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T11:43:05+00:00Added an answer on May 30, 2026 at 11:43 am

    Perhaps something like this:

     venn.diagram(list(B = 1:200, A = 20:40), category.names= expression(B^c, A), 
                fill = c("yellow", "blue"), alpha = c(0.8, 0.8), cex =1.5, cat.pos=0, 
                cat.dist=c(.1, -.1), cat.fontface = 4,lty = 1, fontfamily =3,
                filename = "test001.jpeg")
    

    To get the labels inside the circles, supply ‘cat.dist’ with negative values. The trick is that the reference point is radial distance from the boundary at 12 o’clock rather than from the center. The documentation says that the category.names argument is interpreted with plotmath syntax. The superscript operation in plotmath is done with the “^” operator. I have here moved the A” inside while leaving the B^c outside to suggest that it is the area outside the B circle that is being labeled. (I also improved the plotting time by making the example smaller.) I tried drawing three labels but that does not seem to “part of the package”.

    enter image description here

    Here’s a way you can annotate with grid.text() on the screen device:

    plot.new()
    venn.plot <- venn.diagram(
     x = list(B = 1:200, A = 20:40), category.names= expression(B^c, A), 
              fill = c("yellow", "blue"), alpha = c(0.8, 0.8), cex =1.5, 
              cat.pos=0, cat.dist=c(.05, -.1),  filename = NULL) ;
     grid.draw(venn.plot); # grid graphic requires explicit print or draw operation
     grid.text("B",x=0.8)
    # then you can save to file
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on a website that has to do with a subscription
I have been working on an Android app using Phonegap and now would like
I have been working with Visual Studio (WinForm and ASP.NET applications using mostly C#)
I have been working with a string[] array in C# that gets returned from
We have been working with CVS for years, and frequently find it useful to
I have been working on a system which I'm using protobuf-net (version 2.0.0.480) for
I have been working on a Core Data iOS app that works perfectly through
I have been working on a JQuery script that posts JSON to my asp.net
I have been working on a cube and noticed that when I am browsing
I have been working on something which a friend asked me. He is using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.