Complete canonical API text; task articles explain the workflows. Tutorials
Site guide · find your task
Setup and learning paths
HomeInstall and prepare the environmentChoose your learning moduleModule I · Chord
1.1 Tables and field meanings1.2 Produce and import comparisons1.3 Build the layers step by step1.4 Direction, curvature and clearance1.5 Filter and summarize links1.6 Full source-file workflow1.7 Complete chord showcaseModule II · Collinear
2.1 Reuse chord input tables2.2 Switch coordinates and add layers2.3 Routes, clearance and the ruler2.4 Compare CDS neighbourhoods2.5 Focus, anchors and segments2.6 Complete collinear showcaseModule III · Plasmid
3.1 DNA, annotations and 13 references3.2 From a circle to annotation layers3.3 Features, primers and restriction3.4 Thirteen plasmid references3.5 Complete plasmid casesConsult as needed · Data and layers
Prepare tables and coordinatesImport and convert dataImport nucleotide and protein alignmentsProject protein intervals to genomic coordinatesFeatures, stacking and genomic decorationLabels and local placementQuantitative tracksMappings, scales, guides and themesSet values by sequence and strandCommon adjustments and grammarExport, preview and diagnosticsLearning map and reference
Articles and complete workflowsFunction referenceReproducible galleryFrequently asked questionsMigrate to the candidate APITerminology and design sourcesDevelopment status and changes
Inspect one target-size render without changing the plot
Source:R/diagnostics.R
diagnose_ggchord.RdBuilds on a temporary device of the requested kind and measures the actual
single panel after gtable layout, then refines physical geometry within a
bounded render-local context. The original plot and its layout cache are
left unchanged. Standard saving continues to use ggplot2::ggsave().
Arguments
- plot
A ggchord plot.
- width, height
Positive target canvas dimensions.
- units
Dimensions in
"in","cm","mm", or"px".- device
Target device:
"png","pdf", or"svg". It must be available in the current R environment. Only this device is inspected.- dpi
Raster resolution; also defines pixel dimensions.
- min_size, min_linewidth
Advisory minimum text size and line width, both in millimetres. These do not modify the supplied style.
- colour_vision
Request optional simulated colour-vision hints.
Value
A ggchord_diagnostics list with measurement, checks, text and
guide measurements, colour suggestions, existing label_diagnostics,
annotation_registry, track_registry, track_diagnostics, and captured
device warnings. Field units and provenance are described in
ggchord_layout_contract. measurement$status concerns panel measurement only;
it never means that all quality or portability checks passed.
Details
Results describe evidence, not a general quality certificate. Checks cover
registered vertex bounds, measured text, small text/lines, oversized guides,
and existing label/track diagnostics. Objects outside a panel with
clip = "off" are legal when they still fit the canvas. Unregistered custom
grobs, arrowhead extents, font embedding/fallback and cross-application
transparency are not certified. Device warnings remain in the report.
Grayscale suggestions compare luminance of opaque discrete mapped colours
(difference below 0.05); continuous gradients are deliberately excluded.
With colour_vision = TRUE, optional colorspace public simulations for
protan/deutan/tritan at severity 1 in linear RGB flag Lab distances below 10.
These heuristic thresholds ignore spatial context, alpha compositing and
viewing conditions, and never automatically change the plot or fail a run.