| generate_proportional_svg | R Documentation |
Circle sizes and inter-circle distances are solved analytically (2-set, exact) or by triangulation (3-set, approximate) so that overlap areas match the requested intersection counts. The returned SVG matches the 44-model schema: ShapeA-I, NameA-I, Count_*, CountSUM_*, Bullet* elements are all present and addressable via xml2.
generate_proportional_svg(
result,
width = .PROP_DEFAULT_WIDTH,
height = .PROP_DEFAULT_HEIGHT
)
result |
A ['RegionResult-class']. |
width |
Canvas width in pixels (default 600). |
height |
Canvas height in pixels (default 600). |
A 'character' (length 1) with the raw SVG.
tmp <- tempfile(fileext = ".tsv")
writeLines(c("Gene\tSetA\tSetB",
"GENE1\t1\t0",
"GENE2\t1\t1",
"GENE3\t0\t1"), tmp)
ds <- load_tsv(tmp, binary = TRUE)
res <- analyze(ds, model = "proportional")
svg <- generate_proportional_svg(res)
nchar(svg) > 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.