Skip to content

2D Planes

The Matplotlib backend produces static 2-D pressure plots suitable for publications and quick inspection. See Mono-element Fields for working code.

Monochromatic fields

from esdiva.plotting import plot2D_pressure_slices

plot2D_pressure_slices(p, x=x, y=y, z=z, db_scale=True, vmin=-40)

Renders three orthogonal slice views (XZ, XY, YZ). If one spatial dimension has size 1, a single 2-D image is shown.

Monochromatic pressure slices — linear array

Transient fields

from esdiva.plotting import plot2D_pressure_slices

plot2D_pressure_slices(p_transient, x=x, y=y, z=z, time_array=t, db_scale=True, video_duration_s=5)

Creates an animated display of time frames spread evenly over the specified duration.

Diverging-wave transient wavefront

Full parameters: API → Plotting.