Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
genome-spy-python
Logo
genome-spy-python
  • Getting started
  • User guide
    • Data and chart inputs
    • Charts and marks
    • Encodings and channels
    • Scales, axes, and legends
    • Transforms
    • Composition
    • Import remote view specifications
    • Configuration
    • Chromosomes and locus scales
    • Large and indexed genomic data
    • Build linked genome tracks
    • Label points and genomic intervals
    • Parameters and interaction
    • Create and update charts in notebooks
    • Display controls and embed options
    • Save and inspect charts
  • Gallery
    • Manhattan plot
    • Brush-linked genome tracks
    • Volcano plot
    • MA plot
    • Volcano plot
    • Genome tracks with gene annotations
    • Stacked genome browser tracks
    • Sashimi plot
    • BAM read alignments
    • Dynseq binding-QTL tracks
    • Composing a genome browser
    • Chromosome ideogram
    • GFF3 gene annotations
    • RefSeq genes with scored labels
    • BigBed cCRE track
    • Indexed FASTA six-frame translation
    • Indexed FASTA sequence track
    • Multiple sequence alignment
    • P53 multiple-sequence alignment with an overview brush
    • Lollipop plot
    • PIK3CA mutation lollipop plot
    • Rainfall plot
    • ClinVar variants track
    • Oncoplot
    • LAML oncoplot with clinical and pathway annotations
    • LUAD oncoprint
    • Set intersections with an UpSet plot
    • Copy-number profile
    • ASCAT copy-number segmentation
    • Interactive ASCAT purity/ploidy fitting
    • HCC1954 structural variants and copy number
    • TCGA ovarian cancer GISTIC landscape
    • Point mark
    • Rect heatmap
    • Ranged rule mark
    • Link mark
    • Sequence logo
    • Vertical concatenation
    • Scrollable viewport
  • Example datasets
  • API reference
    • genome_spy.Chart
    • genome_spy.ConcatChart
    • genome_spy.HConcatChart
    • genome_spy.ImportedView
    • genome_spy.LayerChart
    • genome_spy.MultiscaleChart
    • genome_spy.TopLevelSpec
    • genome_spy.VConcatChart
    • genome_spy.Angle
    • genome_spy.Color
    • genome_spy.Direction
    • genome_spy.Dx
    • genome_spy.Dy
    • genome_spy.FacetIndex
    • genome_spy.Fill
    • genome_spy.FillOpacity
    • genome_spy.Key
    • genome_spy.Locus
    • genome_spy.Opacity
    • genome_spy.Sample
    • genome_spy.Search
    • genome_spy.SemanticScore
    • genome_spy.Shape
    • genome_spy.Size
    • genome_spy.Stroke
    • genome_spy.StrokeOpacity
    • genome_spy.StrokeWidth
    • genome_spy.Text
    • genome_spy.Tooltip
    • genome_spy.UniqueId
    • genome_spy.X
    • genome_spy.X2
    • genome_spy.XOffset
    • genome_spy.Y
    • genome_spy.Y2
    • genome_spy.YOffset
    • genome_spy.axes
    • genome_spy.binding
    • genome_spy.binding_checkbox
    • genome_spy.binding_radio
    • genome_spy.binding_range
    • genome_spy.binding_select
    • genome_spy.compare
    • genome_spy.concat
    • genome_spy.condition
    • genome_spy.config
    • genome_spy.data_format
    • genome_spy.datum
    • genome_spy.dynamic_opacity
    • genome_spy.expr
    • genome_spy.hconcat
    • genome_spy.import_view
    • genome_spy.layer
    • genome_spy.locus
    • genome_spy.multiscale
    • genome_spy.param
    • genome_spy.parse
    • genome_spy.ruler
    • genome_spy.scales
    • genome_spy.selection_interval
    • genome_spy.selection_point
    • genome_spy.step
    • genome_spy.title
    • genome_spy.to_arrow_ipc
    • genome_spy.value
    • genome_spy.vconcat
    • genome_spy.view
    • genome_spy.view_config
    • genome_spy.when
    • genome_spy.AxisGenomeData
    • genome_spy.BrushConfig
    • genome_spy.Data
    • genome_spy.DataFormat
    • genome_spy.DynamicOpacity
    • genome_spy.ExprRef
    • genome_spy.Expression
    • genome_spy.GenomeAxis
    • genome_spy.HandledTooltip
    • genome_spy.Legend
    • genome_spy.Paddings
    • genome_spy.Parameter
    • genome_spy.Parse
    • genome_spy.RulerMarkConfig
    • genome_spy.Scale
    • genome_spy.SelectionDomainRef
    • genome_spy.SizeDef
    • genome_spy.Step
    • genome_spy.Title
    • genome_spy.data.LazyNamespace
    • genome_spy.data_transformers.DataTransformerSettings
    • genome_spy.datasets.available_datasets
    • genome_spy.datasets.load_dataset
    • genome_spy.datasets.DatasetNotFoundError
    • genome_spy.JupyterChart
  • About
Back to top

Link mark¶

Dome-shaped links connect paired positions and demonstrate interval-style relationships in a compact view.

Code¶

"""Link mark.

Dome-shaped links connect paired positions and demonstrate interval-style
relationships in a compact view.
"""

import genome_spy as gs
from genome_spy.datasets._grammar import link_data


# Load pairs of positions and a height for each link.
data = link_data()

# Connect each pair with an arc, using y to set its height.
chart = (
    gs.Chart(data)
    .mark_link(linkShape="dome", size=2)
    .encode(
        x=gs.X("x:Q").scale(domain=[0, 18], zoom=True).title("Start"),
        x2=gs.X2("x2"),
        y=gs.Y("y:Q").scale(domain=[0, 12]).title("Height"),
    )
    .properties(title="Dome-shaped links")
)
Next
Sequence logo
Previous
Ranged rule mark
Copyright © genome-spy-python contributors
Made with Sphinx and @pradyunsg's Furo
On this page
  • Link mark
    • Code