vellumplot 0.8.0
-
Flow maps:
mark_flow_map(). A one-to-many flow map on avgraph()plot:
a singlerootfans out to every destination along smooth, merging branches
whose width tracks the flow volume (the Minard / migration-map idiom).
type = "spiral"(default) builds an angle-restricted spiral tree from the
\pkg{edgebundle} package;type = "steiner"builds an approximate Steiner tree
(additionally needs \pkg{interp}). Edgeweightdrives the flow, which is
mapped ontowidth_range. Needs the suggested \pkg{edgebundle} package. -
Edge bundling:
mark_edge_bundle(). A drop-in alternative tomark_edges()
that routes a graph's edges as bundled curves instead of straight lines, so a
dense node-link hairball collapses into a few legible trunks.typeselects the
algorithm ("force","divided","stub","path","hammer","mingle")
andparamspasses tuning through to the \pkg{edgebundle} package, which
computes the geometry; vellumplot draws the returned paths with the usual edge
aesthetics (faint by default so overlapping trunks read as density). Needs the
suggested \pkg{edgebundle} package (>= 1.0.0). -
Chord diagrams:
vchord(). Wraps a weighted flow (afrom/to/value
list or a square flow matrix) onto a circle -- one arc per node, one ribbon per
flow through the centre. Directed: each node's arc splits into an outgoing then
an incoming block, soa -> bandb -> aare distinct ribbons and self-flows
loop within a node's sector.directionshows a ribbon's direction by fading
it from source to target ("gradient", default), stopping it short of the
target ("gap"), or"both".sort,gap, andlink_colorecho
vsankey();mark_chord()is the exported layer. -
Removed the unused
max_overlapsargument frommark_text(),
mark_label(), andmark_node_text(). It was reserved for a never-implemented
overlap cap and did nothing; drop it from any call. -
More robust handling of degenerate and extreme inputs. A single distinct
value on an axis undercoord_fixed()/coord_sf()no longer collapses the
panel to nothing; a map centred on a pole no longer gets a runaway aspect
ratio; a circle-pack of collinear equal-value leaves no longer producesNaN
coordinates; and a pathologically deep hierarchy or dendrogram aborts with a
clear "too deep" message instead of overflowing the call stack. -
mark_line(window = )requires a positive integerk. A zero, negative,
or fractional window size now errors clearly instead of silently producing a
wrong (or empty) result. -
A computed-constant
if_falseincondition()is carried into the
interaction model. A negative literal (e.g.-0.5) or a computed constant
(e.g.grey(0.5)) was previously dropped; only genuine per-row column
references are now excluded (and carried per element instead). -
A faceted layer whose own data lacks the facet variable still draws on every
panel, but a genuine evaluation error there is no longer silently swallowed
into that fallback. -
mark_point(auto = TRUE)no longer datashades under a warped coordinate
system. Undercoord_polar()/coord_trans()the >50000-row datashade
fallback — which bins in linear data space — would rasterise into the wrong
place; it is now skipped and the vector path draws, matching the documented
behaviour and the otherautomarks (line/step/segment/edges). -
A sankey column with too many nodes errors clearly. When a column has more
nodes than its inter-node gaps can fit, the node/ribbon heights previously went
negative and spilled outside the panel;vsankey()/mark_sankey()now abort
with a message pointing atnode_gap. -
Aggregating stats drop missing summaries consistently, with a warning. For
a value-summarising bar (mark_bar(y = , fun = )and friends), a category
whose summary isNA(an empty group, or a summary of data containingNA
when the function does not remove it) is now dropped with a warning on both
the grouped and ungrouped paths, which previously treatedNAdifferently. A
layer mapping bothcolorandfillalso keeps both aligned after
aggregation (fillcould previously be left at the wrong length). -
Clearer errors for malformed scale bounds.
scale_x_continuous(),
scale_y_continuous(),scale_size(),scale_size_area(),scale_alpha(),
scale_edge_width(), andscale_edge_alpha()now reject alimits(or output
range) that is not a length-2 vector — and, for the size/alpha/edge scales, a
non-numeric one — with a clear message, instead of failing later with a cryptic
low-level error (e.g.'length = 2' in coercion to 'logical(1)').scale_size_area()
also validatesmax_size. -
add_marginal()rejects a non-numeric mapping. A factorx/ypreviously
slipped through and the marginal was computed over the integer level codes
rather than the data; it now errors clearly, as a character column already did. -
Stricter validation of interactivity and layout arguments.
select_point()/select_interval()reject a non-logicaltoggle/empty(it
was silently coerced toFALSE);vgraph()validateswidth/heightlike
vsankey()/vhierarchy(); andarea()rejects a non-numeric or non-integer
cell index instead of aborting with an opaque "missing value where TRUE/FALSE
needed". -
mark_text()honourshjust/vjustpassed as a variable. They were only
read as constant params, so a value routed through a variable (as
vdendrogram()does per direction) silently fell back to centred, letting leaf
labels run over the edges..emit_text()now reads them value-first, like
angle.vdendrogram()leaf labels also get a larger default gap. -
Dendrograms and unrooted trees.
vgraph()now accepts a base
hclust/dendrogramand gains a height-aware"dendrogram"layout plus an
"unrooted"layout (viagraphlayouts::layout_as_tree_unrooted(), needs
graphlayouts >= 1.2.5).mark_edges(routing = "elbow")gainedelbow_at/
elbow_axisso the elbow can be the dendrogram bracket (corner at the
parent's level) rather than only the midpoint S-bend.vdendrogram()is a
one-line preset: bracket edges, leaf labels,direction, andkto cut the
tree and colour clusters. Also fixesmark_node_text(label = )so an explicit
labelmapping overrides the default vertex name (it was previously ignored). -
vhierarchy()respectsscale_fill_*(). By default nodes are still
coloured by their depth-1 branch and lightened with depth, but the branch is
now an ordinary discrete fill scale, soscale_fill_manual()/
scale_fill_discrete()recolour the branches and alightenargument controls
the depth fade (0= flat colour per branch). Mappingfillto a node column
instead colours every node by that variable (discrete or continuous, with the
matchingscale_fill_*()), with no depth fade.