plot_mesh
plot_mesh(x, y, *, skip=1, figsize=(10, 6), title='Mesh', filename=None, show=True)
Plot a 2-D structured mesh as grid lines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
ndarray
|
x-coordinates, shape (ni, nj) or (ni, nj, 1). |
required |
y
|
ndarray
|
y-coordinates, same shape as x. |
required |
skip
|
int
|
Plot every skip-th grid line in each direction. Useful for dense meshes where plotting every line is slow. |
1
|
figsize
|
tuple[float, float]
|
Figure size (width, height) in inches. |
(10, 6)
|
title
|
str
|
Plot title. |
'Mesh'
|
filename
|
str | None
|
If given, save the figure to this path. |
None
|
show
|
bool
|
Whether to call plt.show(). |
True
|
Returns:
| Type | Description |
|---|---|
Figure
|
The matplotlib Figure. |