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
| Argument | Type | Description |
|---|---|---|
label | str, bool or None | Column of the labels. Default: the group of the chart. False hides the labels. |
show | bool | Whether to show the labels. Default True. |
cluster | int, str or list, optional | The clusters to label, by number (from 1) or name. Default: all. |
item_style | list of dict | Styles of single labels, e.g. [{"index": 0, "fill": "red"}]. |
group_style | dict of dict, optional | Styles 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_by | str, optional | The 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. |
**options | Further 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.
