PING  0.9
Statistical data handling and processing in production environment
Visualisation

Plot 3-way Venn diagrams (using PROC GMAP) with values displayed in each set and/or set intersections.

%diagram_venn(idsn, var=, valpct=, valnum=, valid=, format=, label=, ofn=, odir=, ilib=,
hover=, title=, fontSize=4, labelFontSize=4, imgFmt=gif, valColor=white, bgColor=white);;

Arguments

Example

We provide here an example presented in the original code (see note below).

Given the table Example in WORKing library:

DATA Example;
input Scholars Students Athletes p;
cards;
1 0 0 0.07
0 1 0 0.23
0 0 1 0.12
1 1 0 0.03
0 1 1 0.08
1 0 1 0.04
1 1 1 0.02
;
run;

then running:

%diagram_venn(Example, var=Scholars Students Athletes, valpct=p, format=percent8.1);

will produce the following graphical result:

Venn diagram

Run macro %_example_diagram_venn for examples.

Notes

  1. The macro %diagram_venn is a wrapper to L. Joseph's original %VennDiagram macro which implements a 3-Way non-proportional Venn diagram. Original source code (no license, no disclaimer) is available at http://www.medicine.mcgill.ca/epidemiology/joseph/pbelisle/VennDiagram.html.
  2. This macro creates Venn diagram using SAS/Graph PROC GMAP where each segment of the Venn diagram is a totally separate map area, so the color/drilldown/etc of each piece can be controlled separately.

References

  1. Allison R. webpage on SAS/Graph samples from which the code is derived.
  2. Harris, K. (2008): "How to generate 2, 3 and 4 way Venn diagrams with drill down functionality within 4 minutes!".
  3. Li, S. (2009): "Customized proportional Venn diagrams from SAS system".
  4. Kruger, H. (2011): ["Creating proportional Venn diagrams using Google and SAS"](Creating proportional Venn diagrams using Google and SAS).
  5. Harris, K. (2008): "V is for Venn diagrams".

See also

venn, vennmap, VennDiagram, PROC GMAP.