
Plot B-spline Basis Functions Using ggplot2
plot_bspline_basis_ggplot.RdPlots a B-spline design matrix using ggplot2, optionally applying log scales
to the x or y axes. Each column of the matrix is treated as a separate basis function.
Arguments
- omega
A numeric vector of input values at which the basis is evaluated.
- design_matrix
A numeric matrix (rows = length of
omega, columns = basis functions).- k
(Optional) The degree of the B-spline basis. Used only for labelling.
- logx
Logical; if
TRUE, plot the x-axis on a log10 scale.- logy
Logical; if
TRUE, plot the y-axis on a log10 scale.