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 changesRenders a plot with ggsave() into a temporary PNG or SVG and opens a
small static preview page in the configured IDE viewer or web browser. This
is an export-size preview, not an interactive plot conversion; the original
plot and its standard ggsave() workflow remain unchanged.
ggchord inputs are rendered on a private copy, preserving their layout cache.
See ggchord_layout_contract for the distinct preview/export/diagnostic results.
Automatic height fitting does not resize an overwide legend. If decorations
exceed the requested width, increase width or use, for example,
guides(seq_colour = guide_ggchord_legend(nrow = 2)).
Arguments
- plot
A ggchord or ggplot object, default
last_plot().- width
Positive output width. With no explicit dimensions,
coord_chord()uses 12.39 inches whilecoord_circular()derives its width from the annotation envelope.- height
Positive output height. With no explicit dimensions,
coord_chord()uses 9.71 inches whilecoord_circular()derives both dimensions. UseNULLto fit the sequence, labels and legends while preserving equal coordinate units. Explicit width/height values are always respected.- units
Output units:
"in","cm","mm", or"px".- device
Preview device,
"png"or"svg". SVG output requires the optional svglite package or a working base Cairo SVG device.- dpi
Positive raster resolution, default 144.
- bg
Optional background colour passed to
ggsave().- viewer
How to open the preview:
"auto"prefersgetOption("viewer")and falls back to a browser in interactive sessions;"ide","browser", and"none"select an explicit destination."none"is useful in scripts and tests.
RStudio plot pane and export-size rendering
Label packing, guide sizing, and fitted limits use the active graphics
device's physical dimensions. Printing p in a small or narrow
RStudio Plots pane can therefore produce a substantially different layout
from an export, and very small panes may not have enough room for all radial
labels. Resize or Zoom the pane and print again for a larger direct preview.
For size-sensitive chord plots, use view_ggchord() while composing,
then save the final figure with ggsave() at an explicit width and
height matching the intended output. Preview measurements restore the
previously active graphics device.
