Skip to content

GC.labels() ​

Add labels to the genes.

Usage ​

python
chart.labels(label, show, cluster, item_style, group_style, style_by, **options)

An argument shown without a default is optional too: left out, the chart keeps its default.

chart is a GC chart.

Arguments ​

ArgumentTypeDescription
labelstr, bool or NoneColumn of the labels. Default: the group of the chart. False hides the labels.
showboolWhether to show the labels. Default True.
clusterint, str or list, optionalThe clusters to label, by number (from 1) or name. Default: all.
item_stylelist of dictStyles of single labels, e.g. [{"index": 0, "fill": "red"}].
group_styledict of dict, optionalStyles by group, applied to the labels of all genes of that group (the group of the chart, or the column style_by), e.g. {"tnsA": {"fill": "white"}}. item_style takes precedence.
style_bystr, optionalThe column group_style is matched against, or "geneTrack" for the track of a gene with cluster(prevent_gene_overlap=). Default: the group of the chart.
**optionsFurther label options, e.g. font_size="10px". adjust_labels: True (default) turns labels that overlap another one, "hide" hides them, False leaves them as they are, and "spread" puts the labels on one line below the lowest gene, with a line to each gene. leader_line sets the distance and the style of those lines, e.g. {"length": 30, "stroke": "grey"}, or False for no lines. spread_position="top" puts the spread labels above the highest gene.

Value ​

GC: The chart with the labels.