Skip to content

Commit 8c039f9

Browse files
author
Lebec Laetitia
committed
Update on field option for plot_scalar function
1 parent 2460fcd commit 8c039f9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

stagpy/field.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,15 +259,19 @@ def plot_scalar(step: Step, var: str, field: Optional[ndarray] = None,
259259
return fig, axis, surf, cbar
260260

261261

262-
def plot_iso(axis: Axes, step: Step, var: str,
263-
field: Optional[ndarray] = None, **extra: Any) -> None:
262+
def plot_iso(axis: Axes, step: Step, var: str,
263+
field: Optional[ndarray] = None, **extra: Any) -> None:
264264
"""Plot isocontours of scalar field.
265265
266266
Args:
267267
axis: the :class:`matplotlib.axes.Axes` of an existing matplotlib
268268
figure where the isocontours should be plotted.
269269
step: a :class:`~stagpy._step.Step` of a StagyyData instance.
270270
var: the scalar field name.
271+
field: if not None, it is plotted instead of step.fields[var]. This is
272+
useful to plot a masked or rescaled array. Note that if
273+
conf.scaling.dimensional is True, this field will be scaled
274+
accordingly.
271275
extra: options that will be passed on to
272276
:func:`matplotlib.axes.Axes.contour`.
273277
"""

0 commit comments

Comments
 (0)