Venndir class
Details
This object is intended to contain all the required data to produce a venndir figure. The components in this object can be edited.
Slots:
jps:
JamPolygon
containing the set and overlap polygons.Columns
"x"
,"y"
contain polygon coordinates, seeJamPolygon-class
for details on multi-part polygons, and polygons with holes.The polygon type is defined with column
type
and values"set"
or"overlap"
.The "set" polygons are intended to be the full circle for each set, but may be
NA
orNULL
to indicate the set is empty.The "overlap" polygons are expected to be contained inside "set" polygons, and each overlap polygon may be multi-polygons with or without holes. For example, the "set" polygon for
set_A
which is a circle fully contained inside another setset_B
. The "overlap" polygon forset_A
would be empty, since there is no region unique toset_A
. However the "overlap" polygonset_A&set_B
would contain the full circle defined by "set" polygonset_A
. Lastly the "overlap" polygon forset_B
would be a circle with a hole located at "overlap"set_A&set_B
. or ellipse. The overlap polygons are polygons, possibly multi-part with or without holes, or may beNA
orNULL
to indicate that this overlap does not have a corresponding polygon.The
name
column contains set or overlap names, where multiple sets are concatenated with"&"
by default. or ellipse corresponding to each set insetlist
), and the overlap polygons. Where an overlap does not exist, the polygon coordinates will be empty, or will have entirelyNA
values for "x" and "y".
label_df:
data.frame
which contains information about Venn labels placement and content. It should contain one row for each Venn overlap. When data contains signed overlaps, each overlap is sub-divided by the combination of overlap signs, with one row per overlap and overlap signs. Overlap signs are summarized based upon argumentoverlap_type
, seesigned_overlaps()
."overlap_sign"
represents the combination of overlap name, and the overlap sign across all sets."text"
indicates the count label to be displayed."venn_counts"
indicates the numeric number of Venn overlaps in each row."item"
should be alist
that containscharacter
vectors of items in each overlap set. Column"item"
is optional."nsets"
indicates the number of sets involved in the overlap."x"
,"y"
represent the label coordinate to use inside each polygon overlap. When the label is displayed outside the polygon, the values"x_offset"
and"y_offset"
are added to"x"
and"y"
, respectively. In this way, a line segment can be drawn from the outer label back to the corresponding polygon."color"
indicates the color for each label. Note the actual color may be modified based upon the background fill color to maximize the contrast and visibility of the color. For example blue on a dark background is displayed as light blue."fontsize"
indicates the base font size, prior to any optional adjustment withfont_cex
."fill"
indicates an optional color fill behind the count label. WhenNULL
(default) there is no color fill. This value is usually populated by argumentlabel_style
which is passed tovenndir_label_preset()
."border"
indicates an optional border around count labels, and is handled similar to"fill"
."padding"
,"padding_unit"
,"r"
, and"r_unit"
are used withgridtext::richtext_grob()
to define padding around count labels, and optional rounded corners when border is displayed.Other columns are intended for internal use by
render_venndir()
and are not yet fully editable.
setlist:
list
with thesetlist
used to create the Venn overlaps. Previously this data could be inferred fromlabel_df
which was tedious, and required column"item"
which is optional. That said,setlist
can be an emptylist()
.metadata:
list
with optional metadata, intended for future expansion, such as plot title.
See also
Other JamPolygon:
JamPolygon-class
,
[,JamPolygon,ANY,ANY,ANY-method
,
add_orientation_JamPolygon()
,
area_JamPolygon()
,
bbox_JamPolygon()
,
buffer_JamPolygon()
,
check_JamPolygon()
,
check_Venndir()
,
eulerr_to_JamPolygon()
,
farthest_point_JamPolygon()
,
find_venn_overlaps_JamPolygon()
,
has_point_in_JamPolygon()
,
intersect_JamPolygon()
,
label_fill_JamPolygon()
,
label_outside_JamPolygon()
,
label_segment_JamPolygon()
,
labelr_JamPolygon()
,
minus_JamPolygon()
,
nearest_point_JamPolygon()
,
nudge_JamPolygon()
,
plot.JamPolygon()
,
point_in_JamPolygon()
,
polyclip_to_JamPolygon()
,
polygon_circles()
,
polygon_ellipses()
,
sample_JamPolygon()
,
split_JamPolygon()
,
union_JamPolygon()
,
update_JamPolygon()