Search
Ploticus >
Scripts >
proc venndisk creates Venn diagrams. Ploticus 2.33+ can also create "Venn magnitude charts".
Venn diagrams
Click to see example code
To create a venn diagram, write a script that invokes proc_venndisk once for each disk.
For each disk you supply the coordinates (in inches or cm) of the disk center and the area.
Thus it is a manual process not very suitable for automation.
The following attributes are used in producing traditional venn diagrams.
location (or bottomlocation) and area must be supplied.
location
x y
Location of the center of the disk.
Typically absolute units, but may be scaled units if (s) is appended to x and y values
(requires an areadef).
Example: location: 3 4
Example: location: 44(s) 48(s)
bottomlocation
x y
Specify the location of the bottom of the disk. Used instead of location... allows
several disks to be aligned along the bottom.
area
square inches (or cm)
The area of the disk in square inches or cm (whatever you're using as
absolute units).
See also areascale below.
Example: area: 8
color
color
Color of the disk. If not specified red will be used.
legendlabel
text
(formerly known as label)
A label to appear in a legend.
The \\n construct can be used to force a line break when the legend is displayed,
or the label can be wordwrapped using proc legend wraplen attribute.
proc legend
must be invoked afterwards to render the legend.
Venn magnitude charts
Click to see example code
To create a venn magnitude chart, write a script that sets up a plotting area (proc areadef),
gets some area values (proc getdata), and then invokes proc_venndisk one time. One disk will be
rendered for each row of input data.
The following attributes are used in producing venn magnitude charts.
areafld must be specified.
areafld
dfield
A data field containing an area value.
See also areascale below.
xfld
dfield
A data field containing a plottable X location in the plotting area. Each disk will be
centered over these X locations. If not specified, successive disks will be placed
at X=1, X=2 ...
colorfld
dfield
A data field containing a
color
value. If not specified the color attribute will be used.
A data field can contain none which will suppress fill on the disk.
color
color
May be specified to set all disks to this color.
yloc
plottable Y value
Sets the Y location of the bottoms of all disks. If not specified Y=0.5 is used.
labelfield
dfield
A data field containing label text. If this attribute is specified labels will be rendered
below each disk. Label text can contain \\n to get line breaks.
labeldetails
textdetails
Font, color, size of the labels.
General attributes
These attributes can be used with Venn diagrams or magnitude charts.
areascale
h
A scaling factor to be applied to the given area value(s),
allowing them to reflect the reality of the application.
Area value(s) will be multiplied by this scaling factor in order to derive an appropriate
disk area value in inches (or cm).
density
h
This allows the density of the dot fill to be adjusted. 1.0 is the default.
A lower value reduces the dot density; a higher value increases dot density.
A value of 0 completely suppresses dot fill, to do outline-only disks for example.
outline
linedetails
| no | yes | bevel
Default is yes.
If yes or a
linedetails
specification is given, disk is outlined.
If no, disk is not outlined.
Exmaple: outline: width=1.0
dotsize
h
h is a value in absolute units controlling the size of the fill dots (actually
tiny line segments; h is the length of each tiny segment).
Default is 0.008 (inches).
If you're not seeing fill dots on your output device try raising this value slightly.
You can also try 0.0 to get one-pixel dots on some (but not all) output devices.
solidfill
yes | no
If yes, disks are filled with solid color.
Venn magnitude chart variations
Venn magnitude chart without dot fill. Click to see example code
Venn magnitude chart with solidfill. Click to see example code
|