Create a qeviz plot object
qe_plot.RdReturns a qe_plot object that can be customised with chained qe_*()
functions and rendered by printing, qe_export_html(), or qe_html().
Usage
qe_plot(
x,
title = NULL,
width = "100%",
height = 440,
range = NULL,
scale_points = TRUE,
point_scale = NULL,
center = c("origin", "content"),
palette = NULL,
view_padding = NULL,
...
)Arguments
- x
Either a raw rENA / tma / ona set object or a
ModelDatalist fromqe_model_data()/qe_extract().- title
Plot title. When given it is drawn at the top of the plot (and included in SVG / PNG exports) and used as the page title; when
NULL(default) nothing is drawn and the page title is "qeviz".- width
CSS width string. Default
"100%".- height
Plot height in pixels (numeric) or any CSS string. Default
440.- range
Symmetric axis range, as rENA's
scale.to:"network"(±max |node| × 1.2),"points"(±max |point| × 1.2) or a positive number.NULL(default) uses qeviz's fit (1.3 × the largest mark). Asymmetric ranges (rENA'slist(x =, y =)) are not supported.- scale_points
Rescale unit points and means so the outermost point meets the outermost code node (default
TRUE);FALSEplots raw coordinates, as rENA does.- point_scale
Multiply unit points and means by this factor instead (a positive number), overriding
scale_points.NULL(default) keepsscale_points' behaviour. E.g.1for raw coordinates, or a factor matching another tool's plot.- center
Where the view is centred:
"origin"(default; (0, 0), the ENA convention, where the points' mean sits) or"content", the middle of the nodes' and points' bounding box, so a network that sits off to one side of the origin fills the plot. With"content",range = "network"is measured from that centre.- palette
Group colours, assigned in order of appearance. Default: Paul Tol's colour-blind-safe "bright" scheme. See also
qe_colors().- view_padding
How far the view extends beyond
range: the view shows ±range ×view_padding.NULL(default) uses qeviz's 1.2;1makes the view match the range exactly, e.g. to frame the plot yourself.- ...
Additional arguments forwarded to
qe_extract()whenxis a raw set (e.g.group_col = "Condition",dims = c("SVD1", "SVD3")). Directionality is detected automatically from the set class.
Details
width and height set the plot dimensions and can be supplied here rather
than in a separate sizing call.
Examples
if (FALSE) { # \dontrun{
qe_plot(set)
qe_plot(set, height = 600) |> qe_group("FirstGame")
} # }