numeraire_graphics.plot_factor_loadings#
- numeraire_graphics.plot_factor_loadings(loadings: DataFrame, *, x: str | None = None, series: str | None = None, diverging: bool = True) plotnine.ggplot[source]#
Factor-loading paths over an axis, or a loadings heatmap when no axis is given.
There is no standard core loadings surface — a loadings object is method-local (an IPCA
Gamma, a rolling-beta panel), so this family-B plotter takes a caller-supplied tidy frame with columnsfactor,loadingand an axis (dateand/orentity); a frame lackingfactororloadingraises.With
xgiven (adatefor a time path, a characteristic column for a cross-sectional profile) the loadings are drawn asgeom_line+geom_pointpaths coloured and facetted by factor. Withx=Nonethe frame is shown as a loadings heatmap —factoron the y-axis, the first present ofentity/dateon the x-axis,loadingas the (diverging) fill — the natural view of a static factor x characteristic matrix. The heatmap uses a zero-centred diverging fill by default; passdiverging=Falseto supply a scale yourself.For paths,
seriesnames the column whose entities form separate lines. When omitted and anentitycolumn is present (and is not itself the x-axis), it is selected automatically so separate firms/characteristics are never connected into one artificial path.