Plotting#

Visualize a trajectory with Matplotlib or inspect a fitted geometry in rotatable three-dimensional Plotly views. Install the plot or tutorials extra to use these functions.

Matplotlib trajectories and interactive Plotly geometry plots.

neuralfieldmanifold.plotting.embedding(points, *, ax=None, color='black', linewidth=0.6)[source]#

Plot a three-coordinate trajectory and return its Matplotlib axes.

neuralfieldmanifold.plotting.torus(points, fit, *, opacity=0.15)[source]#

Return a rotatable Plotly point cloud and fitted ring/torus surface.

Tutorial Styling#

neuralfieldmanifold.plotting.set_style()[source]#

Apply the tutorial typography, colors, and line defaults.

neuralfieldmanifold.plotting.prettify(ax, title=None, xlabel=None, ylabel=None, add_legend=False)[source]#

Set axis labels, remove grid lines, and optionally add a legend.

Training and Coefficients#

neuralfieldmanifold.plotting.training_history(history, *, model=None, validation_loader=None, device='cpu')[source]#

Plot losses and order accuracy in the tutorial’s two-by-six layout.

Returns the Matplotlib figure and axes. Supplying a model and validation loader adds an AR-order confusion matrix in the final panel.

neuralfieldmanifold.plotting.coefficients(model, signals, true_coefficients, true_orders, *, device='cpu', title='')[source]#

Overlay true and predicted coefficients for one sample of each AR order.

Signals have shape (sample, time), coefficients (sample, time, lag), and true_orders contains actual AR orders. Returns the figure and axes.