Skip to content

plot

Plot functions used by the report: each returns inline SVG markup.

The functions take the summary values (histogram counts and edges, value-count dicts, correlation matrices as polars.DataFrame, time series as frames with index and value columns) and hand a chart spec to the native renderer.

Classes

Functions:

plot_word_cloud(config, word_counts)

Word cloud drawn as SVG text (needs the wordcloud extra), or the most frequent words as bars without it.

histogram(config, series, bins, date=False)

Histogram from counts and bin edges (lists of them when comparing).

Returns: The chart, or None without usable data.

mini_histogram(config, series, bins, date=False)

A small histogram for the variable overview.

correlation_matrix(config, data, vmin=-1)

A correlation matrix (a square polars.DataFrame) as a heatmap.

scatter_complex(config, series)

Scatter (or hexbin) plot of complex values.

scatter_series(config, series, x_label='Width', y_label='Height')

Scatter (or hexbin) plot of pairs.

scatter_pairwise(config, series1, series2, x_label, y_label)

Scatter (or hexbin) plot of two variables (complete pairs).

cat_frequency_plot(config, data)

Category frequencies as a stacked bar or a pie (plot.cat_freq.type).

plot_timeseries_gap_analysis(config, series, gaps, figsize=(6, 3))

Line plot of the series with the detected gaps highlighted.

plot_overview_timeseries(config, variables, figsize=(6, 4), scale=False)

Line plot of all time-series variables (optionally scaled to [0, 1]).

mini_ts_plot(config, series, figsize=(3, 2.25))

Time-series line plot (mini by default; larger figsize = full width).

plot_acf_pacf(config, series, figsize=(15, 5))

Autocorrelation and partial autocorrelation plots.

get_ts_lag(config, n_values)

Number of lags of the ACF/PACF plots.