malariagen_data.ag3.Ag3.plot_frequencies_time_series#

Ag3.plot_frequencies_time_series(ds: Dataset, height: int | None = None, width: int | None = None, title: str | bool | None = True, legend_sizing: Literal['constant', 'trace'] = 'constant', show: bool = True, renderer: str | None = None, taxa: str | List[str] | Tuple[str, ...] | None = None, areas: str | List[str] | Tuple[str, ...] | None = None, **kwargs) Figure | None#

Create a time series plot of variant frequencies using plotly.

Parameters#

dsDataset

A dataset of variant frequencies, such as returned by snp_allele_frequencies_advanced(), aa_allele_frequencies_advanced() or gene_cnv_frequencies_advanced().

heightint or None, optional

Figure height in pixels (px).

widthint or None, optional

Figure width in pixels (px).

titlestr or bool or None, optional, default: True

If True, attempt to use metadata from input dataset as a plot title. Otherwise, use supplied value as a title.

legend_sizing{‘constant’, ‘trace’}, optional, default: ‘constant’

Determines if the legend items symbols scale with their corresponding “trace” attributes or remain “constant” independent of the symbol size on the graph.

showbool, optional, default: True

If true, show the plot. If False, do not show the plot, but return the figure.

rendererstr or None, optional

The name of the renderer to use.

taxastr or list of str or tuple of str or None, optional

The taxon or taxa to restrict the dataset to.

areasstr or list of str or tuple of str or None, optional

The area or areas to restrict the dataset to.

**kwargs

Passed through to px.line().

Returns#

Figure or None

A plotly figure containing line graphs. The resulting figure will have one panel per cohort, grouped into columns by taxon, and grouped into rows by area. Markers and lines show frequencies of variants.