Choose Language Hide Translation Bar

Venn Diagram

This add-in constructs Venn diagrams with either constant or proportional areas.  The former accommodate up to five variables and the latter are limited only by the distribution of the counts corresponding to the variables.


The proportional-area diagrams call methods kindly provided by Lee Wilkinson and documented in his paper “Exact and Approximate Area-proportional Circular Venn and Euler Diagrams”, available at  The corresponding computations are performed in Java, so you must have Java installed on your machine to run them.


The input can be either a single table with 0-1 variables or multiple tables with lists of items.  For details, click Add-Ins -> Venn Diagram -> Help after installing the add-in.


An example screenshot is below.




Update May 4, 2015:  The add-in now picks up the format of the frequency variable in the display.

Update December 20, 2018:  Fixes for Java on Mac and cN0[idx] error.


is there a way to format the data labels?  e.g. adding a comma to the number, changing .10 to 10%, etc, or hiding the labels so i can paste in my own?

8108_venn diagram.jpg

Basic editing is available by expanding the "Labels" outline box on the right hand side and making changes in the boxes within.  Please let us know if you need more advanced formatting.

Ah sorry, that previous comment applies only to the labels for each Venn circle, not to the data counts inside the circles.   To format those counts I guess some functionality would need to be added.


This is really a great tool. Wish it had a recall button

great addin! ditto on the Recall button

Hi Venn Friends,


Just uploaded an update, featuring

- Automatic recall of specs in the dialog

- New dialog field that lets you specify a variable with a JMP format, and this format then gets applied to the counts

- New radio button in the display window lets you switch from counts to proportions, allows you to display percentages using the aforementioned formatter

- New checkbox "Density Points" provides a visual display of count density in the diagram

- Example data is now a part of the menu


Please give these a whirl and let me know if you have any problems or ideas for improvement! 

Just would like to ask about a functionality quesiton with the Venn Diagram Add-In.  It seems that it is not linked to changes that might occur in row states (eg Hide and Exclude).  If I hide and exclude row those still are being counted as part of the Venn Diagram.  Is there something that I may be overlooking in setting up the Venn Diagram or might this be bug?

Good catch MKostura--just uploaded an update that now honors excluded rows.  

Thanks.  Nice first step.  But making this Venn Diagram addin completely and dynamically  interactive with row selection would greatly increase utility and uptake by the community.   Right now the fix allows for hidden/excluded rows to function but only as a refresh.  The user has to start over to get the updated diagram.  Connecting to the local data filter would help immensely. 


This would be an excellent addition to the Graph Builder graph type menu.

Can I build VENN diagram in JMP 13Pro?

Hi @irinastl,


Yes, this add-in works with JMP Pro, version 13 to build Venn diagrams.


Go to the top of this post and download the .jmpaddin file and open it in JMP Pro 13. You'll find a Venn Diagram menu at the bottom of your Add-Ins menu.

This is a great add-in. However, when I check the box for "Proportional Areas" I get the following error in a JMP Alert window: invalid subscript (must be number or list of numbers) in access or evaluation of 'cN0[idx]' , cN0[/*###*/idx] The Java version of the proportional diagram is produced, but it never gets into a JMP output window. I have tried this in both JMP Pro 13 and 14, and tried the SAS supplied java.exe as well as the supplied version. All give the same error. Non-proportional diagrams work fine and look wonderful. Since the proportional diagrams are partially produced, I can resize and move all the circles to match that, but all that editing gets cumbersome pretty quickly. Is there a simple fix for this problem?

Does this only work on Win version of JMP ?

No, it works in JMP for Mac too. I think all JMP add-ins work anywhere. But this one also give an error in JMP for Mac when checking the box for proportional areas, although it is a different error message than in Windows.

Russ - thanks for all the recent help making this Add-In even better.

Now that the hard stuff is done... :)  I also echo MKostrua's comments above:


"But making this Venn Diagram addin completely and dynamically  interactive with row selection would greatly increase utility and uptake by the community.   Right now the fix allows for hidden/excluded rows to function but only as a refresh.  The user has to start over to get the updated diagram.  Connecting to the local data filter would help immensely.  This would be an excellent addition to the Graph Builder graph type menu."

Hi Russ,


Love the venn diagram tool. I was wondering if an update that allows for display of shared object names (instead of just object counts) in the body of the graph would be possible?



Hi All,  Just in time for Santa's sleigh, attached is an update that should fix proportional area running Java on the Mac, as well as the cN0[idx] error.


@MKostura @John_K  there are some tricky issues in implementing interactivity from the JMP table back to the graph.  For example, exclusion/inclusion would trigger recalc of proportional areas, which can take 5-10 seconds.  Maybe not too bad for basic use cases but if you are making such changes frequently could get clumsy.   More difficult is how to display partial selection in the diagram itself.    For example, if only some of the rows of a Venn sector are selected in the table, how do we visually cue this?   My colleague Drew Foglia (now also a contributor) has been investigating a little and has the idea of water-fill shading from the bottom up in each sector.   Anyone seen any research along these lines?


@AC_Repka  Thanks, I'm not quite following.  You want to completely hide the object counts and instead show a list of states that define a particular sector inside each?   Wouldn't this get completely unmanageable for medium and larger data sets?  I may be completely missing the idea.  Do you have an example picture?

when doing proportional venn diagram with Single Table with 0-1 variables, I'm getting the error meansX[i] and i've traced it to around line 1240 of the VennDiagram.jsl code

at first i thought it was a typo and should have been meansX[idx], but meansX only his 8 elements, so upon show(i), I found that i was 256.

the error seems to occur, in my case, when idx=16, so i guess the if statement conditional is not met until then


// fill in any missing ones using average of circle centers
        cN0 = cN;
        for(idx=1, idx<=two_to_nc, idx++,
            if(cN0[idx]==0 & counts[idx]>0,
                cX[idx] += meansX[i];
                cY[idx] += meansY[i];


view log shows


meansX = [61.44375, 45.68125, 65.83125, 46.16875, 58.4375, 43.08125, 63.8, 62.90625];
meansY = [56.925, 41.56875, 47.0125, 50.83125, 56.51875, 36.85625, 50.9125, 52.375];
two_to_nc = 256;
nc = 8;
i = 256;
invalid subscript (must be number or list of numbers) in access or evaluation of 'meansX[i]' , meansX[/*###*/i]

the script does not crash (but resulting Venn diagram is ugly) if I replace meansX[i] with meansX[8] and same with meansY[i] to meansY[8]

guessing that meansX[i] should be meansX[ceiling(log(idx,2))] ?


Just pushed a fix for this; apologies for the trouble.   Please download the updated attachment and reinstall the add-in.

Hi Russ and all,

Thanks a lot for this! Essential tool!


*Density points: can you give more methodological info on this (i.e. for reference in scientific articles)? BTW each time I run the same dataset the position of the density points changes.
*Format variable: how can this be used? Any "manual" to read?


Previous points/issues:
* Russ, I think @AC_Repka meant exactly that. For example it would be great for smaller size datasets. So, instead of displayed numbers or proportions, for each area, we would have the names - for ex., if I have "3" COLORS in a certain area of te Venn diagram, instead of displaying the number ("3"), we would choose to display their 3 names (for ex. "blue, red, green").
* @MKostura and @John_K Yes good points.
*Proportional areas: I just tried the new addin, and now it works (JMP 14).



*Variables: the function "BY" would be very useful.
*Adding the "Keep dialog open" option would be very useful.



Sorry I missed your message in the holiday scuffle. Yes, I think an option
for counts and/or list of object names would be very helpful. It may not be
great for large data sets, but I think it could be up to the user to decide
what is a reasonable way to display the data. Something along the lines of
[image: image.png]

Thank you for your reply,

Thank you to @russ_wolfinger for this super cool add-in! I was wondering if it could be updated to either: 1) label POINT values when density points are displayed, 2) select records in the table associated with a single point (rather than all the points in a sector) or 3) display information about individual points (sample number, species, trait, etc.) as a hover action  (or any other method that would show multiple attributes for any given point)? 


Any of these options would help answer questions about individual samples that comprise any given sector. Right now, when I have a sector with many points and I select one (which is actually just selecting the sector) I have to search through all the selected records in the table and guess which record applies to a specific point of interest in the graph.


Thanks again for this tool. Casey  

Hi Vennatics,


Just uploaded a new version with the following updates:

1. Before running proportional-area Venns, you must now define the environment variable $JAVA_HOME to point to a path that contains java.exe.  This applies for both Windows and Mac.  You may need to restart JMP after doing this for it to take effect in the add-in.

2. New checkbox in the dialog to leave it open. 

3. Several minor tweaks to output elements.

4. New checkbox "Data Points" in the output window. The idea is to create randomly jittered  X-Y coordinates for all rows in the input table and display them inside their appropriate Venn sector.  (“Density Points” is an older feature with a similar idea, but it plots fewer points and they are not linked to the table.)   New columns named VennSector, VennX, and VennY are added to the table so you can save the table and reuse the points or create coordinates of your own.  Here is an example:




In order to be able to show the points dynamically we switched the base platform from a Graph Box to Graph Builder.   There is now the usual two-way interactivity between the points and table, and consequently between any other graphs derived from the table.   You should even be able to create multiple, interactively-linked Venns if you run the add-in from scratch each time.  Labels on points should also work.


Enjoy and please keep the great feedback and ideas coming!

@russ_wolfinger Thank you, Russ! This is a great addition and the interactivity opens up a lot of new doors for an analysis I'm doing. I really appreciate this add-in.



@russ_wolfinger or any others- I had it working for proportional on another PC, but seem unable to get it to work on my new PC. Have installed java, and set the correct environmental variable $JAVA_HOME to the path for java.exe. But I when run with proportional I always get the ERROR about the environmental variable. Have restarted and reinstalled both java and JMP, and confirmed the environmental variable is functional.


Any advice? I am on windows 10 pro. Appreciate it, and the add-in itself of course!



I think I found the problem- the environmental variable needs to be definded as "JAVA_HOME" not "$JAVA_HOME" as appears in the warning. Perhaps I had tried this on my old instal and forgot.

Thanks @Skilng, just uploaded an update that changes the error message and doc to say "JAVA_HOME" instead of "$JAVA_HOME".

@russ_wolfinger Hi the global variable name change was made, but now I get an error whenever running the latest add-in (was some other more critical code changed?)-

Venn error.PNG

@russ_wolfinger I'm seeing the same error as @Skilng - any chance there is a fix for this? This looks like a great tool, thank you so much!

Apologies @Skilng and @ablavoie , I forgot to include one of the updated files in the jmpaddin zip file.  Please give the new attachment a try.  In the dialog, you should see optional fields allowing for specification of X and Y coordinates of the points in case you want to use results from a previous run or roll your own.   

Hi I am getting the JAVA error above related to proportional diagrams, whenever I run with more than 2 groups.

How do I go about fixing this.

I am windows 10.


@RossS,  Need more details.  Have you defined JAVA_HOME?

I don't think so. I don't know how or where to I define JAVA_HOME?



Click Add-Ins > Venn Diagram > Help to open a doc that contains instructions on how to define a JAVA_HOME environment variable.   We did it this way to avoid more complicated problems that can occur without it.

Venn Friends,

Drew Foglia (@drewfoglia) has kindly just done some nice streamlining work that alleviates the need to define JAVA_HOME before fitting proportional area diagrams.   The updated add-in at the top should now find java automagically on Windows or Mac--just download and drag it onto your JMP window to reinstall.   As always, let us know if you encounter any problems or have ideas for improvements.   Wanted to also mention that integrated Venn functionality is available within JMP Genomics and JMP Clinical.   

Thanks, Russ. Note, if for some reason JMP cannot find a Java runtime on your OS (Windows or Mac) you should still be able to set JAVA_HOME and that runtime will be used. Thanks!!