Plotting helpers

Plotting helpers (optional dependency on matplotlib).

If matplotlib isn’t installed these functions raise a clear ImportError rather than the usual ModuleNotFoundError chain; otherwise they return matplotlib Axes objects so callers can further customise the plots.

The module itself imports lazily so just importing reasitic doesn’t require matplotlib.

reasitic.plot.plot_shape(shape, *, ax=None, color=None)[source]

Plot a shape’s polygons on the xy-plane.

Returns the matplotlib Axes for further customisation.

Parameters:
Return type:

Any

reasitic.plot.plot_sweep(freqs_ghz, L_nH, R_ohm=None, Q=None, *, ax=None)[source]

Plot a frequency sweep of L, R, Q vs freq.

Pass any combination of L, R, Q; missing series are skipped. Returns the matplotlib Axes (twin x-axes used for L vs R/Q).

Parameters:
Return type:

Any

reasitic.plot.plot_lr_matrix(shape, *, ax=None)[source]

Heat-map of the per-segment partial inductance matrix.

Parameters:
Return type:

Any