GC.theme()
Set the theme of the chart.
A theme sets the default look of every part of the chart: fonts, text and line colours, the background, the gene colours and the options of each component. Options set with the other methods (e.g. labels(font_size=...)) take precedence over the theme, whatever the order of the calls. Call it with a theme to start from that theme, or without one to change the current theme.
Usage
python
chart.theme(
theme,
text_scale,
font_family,
text_color,
line_color,
background,
palette,
pattern,
**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 |
|---|---|---|
theme | str or dict, optional | A built-in theme: "default", "classic", "dark", "vintage", "infographic", "publication" or "bw" (black and white, with a pattern per group); or theme settings (see geneviewer_theme). Default: change the current theme. |
text_scale | float, optional | Text size, as a factor of the default font sizes. |
font_family | str, optional | Font of all text. |
text_color | str, optional | Colour of all text. |
line_color | str, optional | Colour of the sequence line, the axis, the coordinates, the scale bar and the lines of spread labels. |
background | str, optional | Background colour of the chart. |
palette | str or list of str, optional | Gene colours: a d3 colour scheme, a geneviewer palette (see geneviewer_palette), or a list of colours. |
pattern | dict or bool, optional | Patterns of the genes, with the arguments of pattern() (patterns, color, background, size, strokeWidth). False removes the patterns of the theme. |
**options | Options per component, as dicts named after the component: chart, grid, cluster, title, cluster_title, cluster_footer, cluster_label, sequence, genes, transcript, labels, coordinates, scale, scale_bar, legend, links, tooltip, track_mouse, toolbar and annotations, e.g. labels={"fontSize": "10px"}. None removes a component from the theme. |
Value
GC: The chart.
