plot_cumulative_energy()#
- PODBasis.plot_cumulative_energy(threshold=None, right=None, ax=None, **options)[source]#
Plot the cumulative singular value energy.
The cumulative energy of \(r\) singular values is defined by
\[\kappa_r = \sum_{i=1}^r\sigma_i^2 \bigg/ \sum_{j=1}^k\sigma_j^2.\]This method plots \(\kappa_r\) as a function of \(r\).
- Parameters
- thresholdfloat or list[floats] or None
Threshold energy value(s) to mark on the plot.
- rightint or None
Maximum singular value index to plot (
plt.xlim(right=right)
).- axplt.Axes or None
Matplotlib Axes to plot on. If
None
(default), a new single-axes figure is created.- kwargsdict
Additional arguments to pass to
plt.semilogy()
.
- Returns
- axplt.Axes
Matplotlib Axes for the plot.