textvenn()
Consider optional text legend, counts per set, with total.
Consider optional multi-line headers, with one line per set name.
data.frame
structure, very doable.Consider option to display items beneath counts? Probably not practical,
but could be combined with max_items=20
, then abbreviate the item
listing, something similar to: "item1, item2, item3, ... (523 others)"
.
Or: cli::ansi_collapse(letters, style="head", trunc=20, ellipsis="...")
,
but split across multiple lines.
Based upon some excellent feedback:
DONE. Move default labels above, not beside the Venn diagram.
Item label enhancements
Debug item_cex
and item_cex_factor
not being applied as expected.
item_cex
to label_df
or jps
for persistence.proportional=TRUE
to assume that
all polygons are already proportional to the number of items.Consider option to retain item factor order when provided, to control the order they are placed.
show_labels
so the set names can be displayed outside.item_cex
and item_buffer
somehow for re-use, otherwise
plot(venndir_out)
does not retain these settings.Improve the default adjustment to item_buffer
based upon number
of items, and relative size of the polygon. With fewer items (2 or 1),
it should more sharply use the center position.
Consider option to justify item label based upon its left-right position in the polygon. Item labels on left edge would be placed so the left edge of the label aligns with the left edge of the polygon. It could help reduce labels overlapping the outside of a polygon. It might make labels more crowded inside the polygon.
Consider some approach to place count label box inside the polygon, with item labels around it? Probably not feasible.
Useful test case, to reproduce a published figure.
Note that as_factor()
does not affect item sorting, only the numeric
prefix seems to work.
as_factor <- function(x){
factor(x, levels=unique(x))
}
venndir::venn_meme(x=list(
CLE=as_factor(c("1 CLE:",
"2 IFNa>IFNb",
"3 Anti-malarials effective\ntherapy for skin disease")),
DM=as_factor(c("1 DM:",
"2 IFNb>IFNa",
"\n3 Triggered by immune\nstimulating herbal\nsupplements",
"\n\n\n4 Anti-malarials effective\nin 25%, commonly causes\nmorbilliform rash",
"\n\n\n\n5 Cannabinoid receptor\nagonist proising\ntreatment")),
`CLE&DM`=as_factor(c(
"1 Photosensitivity",
"2 Triggered by viral and\nbacterial infections",
"3 Increased\ntype I IFN"))),
item_cex=c(1.5, 1.5, 1.2),
xyratio=10,
dither_cex=0)
Adjust aesthetics based upon feedback.
The arrows could be larger relative to the signed counts.
":"
between arrows and signed counts.When adjusting arrow/signed count font sizes, the text is bottom-aligned, should probably be middle (top-middle-bottom) aligned.
vjust=0.5
caused signed labels not to be grouped properly.names(setlist)
contains parentheses, causing the set
name to appear inside the polygon. Removing the parentheses fixes
the problem, but unclear why this happens? Probably errant grep()
call somewhere.Need some way to nudge count labels, to adjust centering polygons.
Consider using cli
for messaging, and for unicode symbol support?
Add generic convenience functions
im()
, im_value()
for Venndir
objects: return incidence matrix,
or signed-incidence matrix.
setlist()
- accessor for setlist
label_df()
- accessor for label_df
overlaps()
or get_overlaps()
- some accessors for set overlaps
nudge_JamPolygon()
- extend with scale
, rotation
.
Consider item_style
with similar presets as label_style
.
Use case is to allow shading/border for item labels,
venndir()
and venn_meme()
.
Consider adding validation for Venndir
Probably only necessary when editing jps
and label_df
, which may be rare
Check that label_df
and jps
are compatible
Consider signed_overlaps()
S4 object?
Currently returns data.frame
- usable but due to the fixed formatting.
Could be useful to "lock it down" to add validation checks,
and to provide convenience functions.
Enhance venndir_to_df()
Add two additional formats:
setlist
entry,
with values -1
or 1
indicating presence of that item.
This format is programmatically easier to use, but requires some
filtering of the table to find particular overlaps.Consider changing return_type="data.frame"
, with "kable"
optional.
Convert from vwline
to gridGeometry
, per pmur002 (author of both)
Initial testing confirms it should work.
Useful functions: polyoffsetGrob()
- use rule="evenodd"
Consider formally recognizing three types of border:
outerborder
- only appears outside the polygon boundary
innerborder
- only appears inside the polygon boundaryborder
- appears exactly on the polygon boundary, default NA
.lwd
, .lty
requires changing venndir()
to use outerborder
and not border
.
Consider customizable digits
for percent overlap label.
textvenn()
quality of life
Accept optional input data in ...
for convenience
Consider using something like show_labels
Consider adding example test cases:
Venn diagram labeled by gene symbol.
Cho et al 2019, https://doi.org/10.1073/pnas.1919528117
Figure 5A: Venn diagram showing +/-rapamycin ER-mito proteome.
Genes are also colorized and highlighted, it might be too much
as a visual, but is possible to replicate.
It shows item labels outside the Venn diagram which may
be useful venndir
feature in future.
Consider adding argument title
or main
to add a title to the figure.
Define title as a grob
that can be manipulated if needed.
grob
follows the figure, so multi-panel figures retain
the title relative to each figure.just
, hjust
, vjust
.venndir_title()
to
hold these options, with useful defaults. It simply returns a grob
.clisymbols
to handle logic of Unicode arrow symbols.Document some "fancy" examples showing item labels:
One-column item layout.
gridtext
syntax.gridtext
features.Customize item fill logic
Generally spread labels more to the center.
xyratio
argument to label_fill_JamPolygon()
is passed, but
high values xyratio=10
cause labels to be placed too far at the top.Consider new rules:
Consider improving how percent overlap is handled
Currently appends to the "text"
column.
"(24%)"
"(24%) J:0.24"
Consider adding column to include the label.
Add documentation. Here is a laundry list of tips:
Show examples with DESeq2 results; edgeR; limma.
grid::gTree
which can be drawn separately.patchwork
,
for example, do this twice, then add the results:
patchwork::wrap_elements(grid::grid.draw(attr(vo, "gtree")))
venndir()
call.JamPolygon
shapes instead of
using pre-defined fixed shapes, or shapes from eulerr::eulerr()
.shape="ellipse"
with proportional diagrams.set.seed(123)
for reproducibility.curate_venn_labels()
to use customized "signs".Show how to extract items for each overlap.
R
itemlist_by_overlap <- split(vns@label_df$items,
factor(vns@label_df$overlap_set,
levels=unique(vns@label_df$overlap_set)))
Show how to make an incidence matrix; or signed incidence matrix.
Add R package integration functions
Probably most useful to integrate packages that produce setlist data, or to Upset plots for people who also prefer that functionality. Probably less useful to integrate with other Venn diagram packages.
stats_to_hitlist()
- consider generic function to convert stats table
to signed hits - generic function could be re-used for package-specific:
DESeq_to_hitlist()
- consider converting DESeq2 results to hitstopTable_to_hitlist()
- convert limma::topTable()
edgeR_to_hitlist()
ChIPpeakAnno()
integration with makeVennDiagram()
to_VennDetail()
to_ggVennDiagram()
to_VennDiagram()
to_UpsetR()
- send data to create an Upset plotto_venn()
- send data to venn
packageto_RVenn()
- send data to RVenn
package
Add remaining small features
venndir()
argument rotate_degrees
is not yet functional.
venndir()
add argument to control line widthConsider launch_venndir_shiny()
with R-Shiny front-end.
Consider JamPolygons using outerborder
instead of border
Methods currently assume all borders are outerborder
, the other option
is innerborder
. This was a design decision, might need to change.
If there is need to display just a border
(not inner, not outer) on
the line itself, there is not a mechanism to do so currently.
find_venn_overlaps_JamPolygon()
and venndir()
to use outerborder
instead of border
.Need changes to plot.JamPolygon()
to use border
instead of thin border,
and outerborder
instead of border
.
Investigate R crash - probably specific to Quartz on MacOS Sonoma 14.4, 14.5
Reproducible workflow in RStudio:
R
library(venndir)
vo <- venndir(make_venn_test(100, 3, do_signed=TRUE), show_labels="ncs")
# open new device
dev.new()
# this time crashes
vo <- venndir(make_venn_test(100, 3, do_signed=TRUE), show_labels="ncs")
"Fatal error: Duplicate keys of type 'DisplayList' were found in a Dictionary."
The crash occurs with venndir-0.0.34.900, and venndir-0.0.36.900, suggesting the risk was not added by updates in 0.0.36.900. Therefore version 0.0.36.900 will be released once it passes other tests.
venndir_legender()
Currently it is drawn using the plot viewport. But when drawn after
the viewport is closed (grid::popViewport()
) the legend appears at
the edge of the figure region, which can be outside the venndir plot.
Consider option for the legend to use the figure viewport and not the
venndir plot viewport.
Prepare for Bioconductor (or CRAN)
DONE. Remove any calls to internal package functions, using :::
gridtext_richtext_grob()
is a custom function, must be removed.
It calls internal functions in gridtext
that can't be ported easily,
for example .Call()
.
The custom function was solely intended to allow vectorized padding
,
currently the bottom,left,top,right is applied to all labels,
and cannot be custom for each label.
The driving goal was to have smaller margins between signed count labels,
since they usually have smaller font size. Otherwise the distance
between signed labels, line-by-line, was too far.
First option, just call gridtext::richtext_grob()
and remove the
ability to use different padding.
Second option, wrap the call inside mapply()
which is what is done
inside gridtext for multiple grobs anyway. It won't be any slower.
Final option is to ask Dr. Claus Wilke to allow a list of vectors
as input for argument padding
.plot.JamPolygon()
DONE. Consider option to return grid grobs instead of drawing them to the graphical device.
render_venndir()
, and venndir()
DONE. Consider option to return the grid grobs to be rendered elsewhere.
Return the viewport
as defined by plot.JamPolygon()
.
grid::pop.viewport()
.
(Note: "DONE" means this functionality is possible, but because the grid
grobs make it possible for the user to do whatever they want.)sets
is properly subsetting setlist
but is not
properly subsetting set_colors
. Verify other components are
also properly subset as needed.venndir()
does not store item_cex
and item_buffer
in the Venndir
object, so calling render_venndir()
does not
retain these values.Consider functions to adjust components of Venndir
figure, to be
visualized by render_venndir()
.
Nudge outer label position by set name, or overlap_set
"label_df$ref_polygon"
, it should
affect all rows with that value."label_df$ref_polygon"
,
it should look for corresponding value in "label_df$name"
or
"label_df$venn_name"
, then convert to "label_df$ref_polygon"
.
Then proceed to update all rows with that ref_polygon
value.Nudge inner label position, same syntax as above.
Nudge a set shape (This workflow is lower priority for now.)
Best practice is to re-run venndir()
using argument circle_nudge
.
Venndir
and just calls venndir()
with corresponding arguments. It should
capture: JamPolygons
for each set; set_colors
; setlist_labels
,
legend_labels
, sets
, etc.Consider option to style item labels. Probably most useful for venn_meme()
.
For example, allow shading, rounded rectangle border, as with set labels.
Fix bugs with proportional diagrams:
One empty set in setlist
causes an error.
The two bugs are related:
overlap_set="set_A&set_B"
.Venndir
object to review this assignment.hjust_inside
,
hjust_outside
, vjust_inside
, vjust_outside
relied upon knowing
which labels were being placed together, and this logic failed.The fix (fixes):
"ref_polygon"
and store in Venndir@jps
.render_venndir()
to recognize this association, instead
of re-determining the association.venndir_label_style()
to recognize this association
so it can properly assign hjust
and vjust
to affected labels.
This function is one feasible place to make the changes.Another alternative draw_gridtext_groups()
which assembles the
grouped labels into a "group" in order to draw one border around them.
This step may be ideal to place labels together in more flexible ways.
grid
viewport context,
then the observed dimensions in grid
space are used to define
the extent of the resulting grid::roundrectGrob()
.adjust_center=TRUE
, so the center of the group is at the label
point, instead of the focal point of labels (normally the set name
is "topleft", the overlap count is "bottomleft", and signed counts
are "right").hjust
and vjust
.Fix venndir()
argument rotate_degrees
which is currently not functioning.
Consider minor adjustments to venndir_legender()
labeling.
Option to hide the trailing colon ":"
Option to left-justify set labels
Consider returning the viewport
from render_venndir()
, and venndir()
when it calls render_venndir()
due to do_plot=TRUE
.
consider adding as an attribute of the Venndir
object
the grid
viewport
is useful when adding to or adjusting an existing
figure, otherwise the coordinate system is not usable.
Write more intensive validation for Venndir
objects.
venndir()
Expand help docs for JamPolygon
Write brief vignette for JamPolygon
objects
Tests for JamPolygon
object functions
generate test shapes: circle, circle with hole (donut), two disjoin squares, square with hole and nested square inside the hole.
point_in_JamPolygon()
, has_point_in_JamPolygon()
points in the polygon, in the hole, in the nested internal solid area.labelr_JamPolygon()
to generate label position inside solid polygon,
also test with has_point_in_JamPolygon()
nearest_point_JamPolygon()
, farthest_point_JamPolygon()
to confirm
proper nearest/farthest points.intersect_JamPolygon()
, union_JamPolygon()
, minus_JamPolygon()
buffer_JamPolygon()
- confirm polygon with hole can become larger
polygon without a hole. Probably check area_JamPolygon()
before/after
several use cases.
Consider moving JamPolygon
to a separate R package.
Painful but might make JamPolygon
a lightweight standalone option,
usable in other Jam packages (without guilt).
Dependencies: polyclip, polylabelr, vwline
Consider adding JamPoints
, JamLines
objects? Ugh. What have I done?
There is currently no way to "Add a point" to a JamPolygon
figure,
since the figure is created in grid
using a viewport
.
do_sparse=FALSE
so the default behavior
is to return a typical matrix
class and not Matrix
compressed form.matrixStats
from dependencies, it is only used once.rescale_coordinates()
.alpha_by_counts=TRUE.
DONE. Consider optional labels for Venndir
setlist_labels
- optional user-customized labels for the Venn diagram,
which may or may not match the name of the set.
legend_labels
- optional user-customized labels for the Venn legend,
again, these may be abbreviated or adjusted to be suitable for the legend.Outer label positions and line segments should be improved.
Sometimes the outer label is across the diagram from the count label, the line segment reaches to the far side. Test with nested proportional set Venn.
should be influenced by the position of the relevant count label.
Consider whether to include percent in the Venndir legend.
textvenn()
output. It would
appear on the line below the overlap count.show_labels
to be applied to each overlap
in order.render_venndir()
- broken when provided with venndir()
output separately.DONE. venn_meme()
- some visual adjustments are needed
DONE. Fix regression in gridtext
, item labels do not recognize <br>
.
Center item labels in the polygon for few number of items (especially one).
Current state: item label is placed near edges and not in the center.
Current state: item_buffer
is the best way to adjust manually.
DONE for venn_meme()
not for general use.
DONE. Label segment for nested, nested sets, uses the full set as fallback. Ideally, it would use the region with the fewest overlaps with other areas.
DONE. venndir()
error
Error is caused when two sets do not overlap, and proportional=TRUE
. See
find_venn_overlaps_JamPolygon()
in venndir-base-polyclip.R#428
intersect_JamPolygon()
in venndir-polyclip.R#245.
venndir_legender()
Use "Set" and "Size" capitalized.
set_colors
,
currently text is always black.plot.JamPolygon()
, plot()
(JamPolygon)
Allow and document how to create a multi-panel plot.
For example, how can it be used with patchwork
to assemble a
Venn diagram beside a heatmap, or beside output from plot_sedesign()
?
render_venndir()
throws font-related warnings when the output PNG or PDF
font library is not found, and sometimes substitutes Unicode characters
with "."
. It seems to happen uniquely to PDF output, might be platform-
and device-dependent. Some suggested workarounds include:
Use extrafonts
package to import the desired fonts. Not tested.
fontfamily
which is recognized for the requested output,
however in RMarkdown when creating PNG and PDF files for the same chunk,
it appears that the PNG and PDF recognized fonts are not consistent.sf
,"rgeos" functionsRemove all portions of remaining functions that call "sp",sf
,"rgeos"
polygon_label_segment()
- still uses a hybrid approach,
accepting sp and jp objects.
Verify the new venndir()
returns equivalent data as venndir_OLD()
even if it is returned in different manner.
Clean up output data format
Verify render_venndir_polyclip()
accepts equivalent input data.
venndir()
output equivalent to previous versions,
so that methods that expect specific output might still work?Consider S4 Venndir
object, with slot names:
slots:
jp
- set polygons, name, label, colorjps
- set/overlap polygons, name, label, type, overlaplabel_df
- overlap count, signed count, count label, items (optional)setlist
- the input setlist
for easy referencemethods:
validate()
- check internal consistency, set names, overlaps, label xy
setlist()
- accessor for setlist
slot
im()
- calls list2im_opt()
im_signed()
(or im_value()
) - calls list2im_value()
plot()
- calls render_venndir()
label positioning shorthand: NOCPSI
Set _N_ame, _O_verlap Name, _C_ount, _P_ercentage, _S_igned, _I_tems
To show items: NCSi: _N_ame/_C_ount/_S_igned outside; items inside
consider table item display inside/outside
gridExtra::tableGrob()
with 1 to 3 columns, which could be positioned
beneath other name/count labels. Seen in published Venn diagram figure.
Probably only works well for a small number of items.
Consider JamPolygon
which is a data.frame
:
data.frame
details:
x
: list
column with one or more numeric
vectors.y
: list
column with one or more numeric
vectors.name
- unique entry, essentially rownames()
label
- by default uses name
but can be anything including NA
,
also it can contain the same label as another polygon.
gridtext::richtext_grob()
?labels
- optional, label each multipart polygon - not implemented yet
fill
- internal polygon fill colorborder
, border.lwd
, border.lty
- outer border
vwline
for variable width lines, part of
which enables rendering the outer/inner portion of a line.innerborder
, innerborder.lwd
, innerborder.lty
- inner border
family
, fontsize
- grid::gpar()
for the label.label_x
, label_y
- to position the label inside the polygonouterlabel_x
, outerlabel_y
- to position the label outside the polygon?plot.JamPolygon()
JamPolygon
likely using grid
methods.print.JamPolygon()
, summary.JamPolygon()
print.data.frame
gridExtra::grid.table()
Related: Could gridExtra::grid.table()
be used for Venn labels?
It would need to be rendered with textGrob()
then replaced with
gridtext::richtext_grob()
Marry gridtext
and ggrepel
for non-overlapping labels.
Follow: https://github.com/wilkelab/gridtext/issues/33
There is a working pull request in gridtext
, pending changes in ggrepel
.
Just awaiting each package author approval.
venndir_legendir()
Consider option to display "Total" unique items as the bottom row.
Fix issue with Venn numeric label coloring when background color is dark.
The venndir_legendir()
label shows light text correctly, the signed
labels appear to be adjusted correctly, but the count label appears
not to be adjusted correctly. Some cells are correct, others are not,
suggesting this is a mismatched ordering issue.
Observed with 4-way Venn, it appears only the overlap regions adjust
text, not the unique-set regions.
DONE. Urgent: Transition from "sp" and "rgeos" to polyclip
since "rgeos"
has been removed from CRAN. Ugh.
Current status:
polyclip::polyclip()
.debug issue when LOCALE is "C" the labels are not shown, and
error is generating saying gridtext
does not recognize characters,
referencing some simple unicode characters (up/down arrows, etc.)
workaround is to change LOCALE to "en_US.UTF-8"
with:
Sys.setlocale("LC_ALL", "en_US.UTF-8")
but unclear why it's a problem?
This workaround does not seem portable for other actual locales.
Optionally display overall percentage below main count label
venndir_legender()
For signed data, include direction labels, colorized properly.
"size"
"direction"
"579"
"(↑: 123, ↓: 456)"
It should call curate_venn_labels()
which means it needs the arguments
curate_df
,unicode
to allow customization.
DONE. Migrate from "sp" to polyclip
"sp" is being retired October 2023. Decided not to use sf
due to
heavy dependencies focused on geographical map software libraries
which are not relevant here.
polyclip
provides the basic manipulations required:
intersect, union, subtract, rotate, buffer.Does venndir
need to accept past object formats with "sp" objects?
polyclip
object.Replace venn_spdf
with data.frame
equivalent format.
Functions to port:
find_vennpoly_overlaps()
- input SpatialPolygons
,
output SpatialDataFrame
eulerr2polys()
- output SpatialPolygons
intersect_polygons()
- input/output SpatialPolygons
union_polygons()
- input/output SpatialPolygons
get_largest_polygon()
- input/output SpatialPolygons
sp_circles()
,sp_ellipses()
- output SpatialPolygons
nudge_sp()
- input/output SpatialPolygons
rescale_sp()
,rescale_ps()
,rescale_p()
,rescale_coordinates()
- ?polygon_label_segment()
sp_polylabelr()
sp_percent_area()
get_sp_buffer()
render_venndir()
label positioning
Consider option to display percentage beside counts for each section, as seen in several other Venn diagram tools. It's probably too much to include percentages with the signed counts.
Consider using grid
coordinates for more rendering,
specifically so labels might be positioned relative to other objects,
seen when resizing a graphical window.
Probably not a use case worth "solving" now that I write it out.
Line segments should more reliably point to "just inside" the polygon shape, where the overlap is more or less a fixed amount, and slightly more than the current defaults. Currently the line mostly points to the border, it's hard to see that the line ends just inside.
Consider new function reposition_venn_gridtext_labels()
based upon draw_gridtext_groups()
group_labels=TRUE
for labels outside,
the whole group of labels is adjusted to right/left side of the connecting
line segment. When group_labels=FALSE
this step does not occur.venndir()
and render_venndir()
DONE: option to hide border around polygons/circles; or adjust line width
Debug rare issue with incorrect text spacing within labels in Venn diagrams?
appears to be some rare grid
state where signed labels have too much
visible spacing between arrows and numbers, for example "^^: 12"
appears like "^^: 12"
for most labels, but not all.
dev.new()
does not resolve the problem in the new plot window.the effect is exagerrated with unicode=TRUE
, and diminished but still
present with unicode=FALSE
. Whitespace is still much wider than normal.
Debug issue when group_labels=FALSE
.
The main set labels are no longer positioned to left or right of the incoming segment, they are positioned over center of the segment endpoint. This code might be errantly inside a conditional block.
consider "normalizing" proportional polygon coordinates so the x,y
ranges
are roughly consistent with those used by fixed 3-way and 4-way Venns.
Potential benefit with other functions that may use absolute or relative
sizes for things like segment_buffer
and item_buffer
.
consider venndir_output
object class?
could be useful for re-use and editing
suggested slotNames
venn_spdf
: soon to be using sf
in form of data.frame
spdf
will change to sf
)x_label,y_label
coordinates of label inside each polygon center,
however not used? the label_df[,c("x","y")]
are slightly different.label_df
: data.frame
text
, venn_counts
,
overlap_set
, type
x,y
coordinates of polygon centerx_offset,y_offset
to position label outside relative to x,y
segment_buffer
used for segment depth into polygonshow_items
, items
, item_cex
, item_degrees
rv_label_df
: (optional?) adjusted data.frame
from render_venndir()
setlist
: new list
representing the input data, for convenienceconsider text output from venndir_legender()
for use by textvenn()
need convenient method to adjust set labels that are too wide
current option is to edit names(setlist)
venndir()
as a one-lineroption to "alias" the sets
venndir_legender()
legendoption to adjust labels on the fly
setlist
could provide a few common adjustment functions
LETTERS
or
jamba::colNum2excelName()
Overall: replace use of "sp" (SpatialPolygons) with sf
(Simple Features)
requires changing venn_spdf
into the sf
equivalent, which could
be nearly drop-in replacement. The sf
default object is based upon
data.frame
already.
nudge_sp()
, rescale_ps()
,
rescale_sp()
, rescale_p()
, rescale_coordinates()
, get_sp_buffer()
.
Some functions like get_sp_buffer()
may be built-in with sf
.replace "rgeos" functions with with built-in sf
equivalents:
gArea()
-> sf::st_area()
gDifference()
-> sf::st_difference()
gBuffer()
-> sf::st_buffer()
gIntersects()
-> sf::st_intersects()
gSimplify()
-> sf::st_simplify()
gUnaryUnion()
-> sf::st_union(x)
gContains()
-> sf::st_contains()
gUnion()
-> sf::st_union(x, y)
venndir()
accept incidence matrix input, by calling im_value2list()
"\n"
characters to <br>
internally,
without having to encode this code at input.overlap_type="overlap"
and suppress the display of directional arrows.consider calling venndir_legend()
, perhaps as an option.
venn_meme()
Examples for venn_meme(wtah, proportional=TRUE)
causes an error
in polygon_label_fill()
potentiallly trying to fill labels into
a polygon overlap that does not exist in the object. It previously
skipped those sections, however an error is thrown.
Consider renaming as venndir_meme()
For fun, consider renaming functions similar to render_venndir()
.
Some ideas:
DONE: venndir_legend()
-> venndir_legender()
?
find_vennpoly_overlaps()
-> venndir_descender()
, it descends
the polygon overlap combinations.get_venn_shapes()
-> venndir_attender()
curate_venn_labels()
-> venndir_amender()
make_venn_test()
-> venndir_extender()
(not sure this one is valid)nudge_venndir_label()
-> venndir_bender()
- general purpose function
to adjust, rotate, re-position the polygons and labels.
Alternate ideas: venndir_mender()
, venndir_blender()
make_venn_combn_df()
-> venndir_blender()
since it combines the
Venn sets into expected combinations of overlaps;
or venndir_sender()
since the function takes set names, "sends" them out
to create a set of Venn overlap combinations.venndir_sender()
new function to return setlist for venndir()
outputcheck build issues on R-4.2.3, dependency on data.table
DONE: Add venndir legend, a simple list with the number of elements in each set.
NOT YET: automate the legend for venndir()
and render_venndir()
DONE: consider something like grid.table()
, grid::tableGrob()
; if that
implementation is too slow, see custom grid.ftable()
described here:
https://cran.r-project.org/web/packages/gridExtra/vignettes/tableGrob.html
Add optional percentage to the Venn overlap counts.
calculation appears to use the overall percentage items.
+--------------------+----------------------------+ | set_name, overlap_name, or blank | +===================:+:===========================+ | overlap_count | ^: up_counts | +--------------------+ | | [overlap_percent%] | v: down_counts | +--------------------+----------------------------+
Consider organizing labels using template styling, with commony used presets
See above for one example.
When showing items, and there are more than max_items
, use the appropriate
label instead of only showing the overlap counts. Honor the argument
overlap_type
as if items were not enabled for this region.
consider using equivalent data.table
implementation for list2im_value()
,
but only if this step appears to be too slow for routine use.
venndir_todo.md
.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.