timflow.steady.plots.PlotSteady.xsection#
- timflow.steady.plots.PlotSteady.xsection(xy: list[tuple[float]] | None = None, labels=True, params=False, names=False, ax=None, fmt=None, units=None, hstar=None, horizontal_axis: Literal['x', 'y', 's'] = 's', sep: Literal[', ', '\n'] = ', ', **kwargs)#
Plot cross-section of model.
This is a shared method that handles cross-section plotting for both steady and transient models. The method automatically adapts the parameter labels based on the model type.
- Parameters:
xy (list of tuples, optional) – list of tuples with coordinates of the form [(x0, y0), (x1, y1)]. If not provided, a cross section with length 1 is plotted for 3D models. For cross-section models the left and right are derived from the elements.
labels (bool, optional) – add layer numbering labels to plot
params (bool, optional) – add parameter values to plot
names (bool, optional) – add inhomogeneity names to plot, only supported for cross-section models.
ax (matplotlib.Axes, optional) – axes to plot on, default is None which creates a new figure
fmt (str, optional) – format string for parameter values, e.g. ‘.2f’ for 2 decimals
units (dict, optional) – dictionary with units for parameters, e.g. {‘k’: ‘m/d’, ‘c’: ‘d’}
horizontal_axis (str) – ‘s’ for distance along cross-section on x-axis (default) ‘x’ for using x-coordinates on x-axis ‘y’ for using y-coordinates on x-axis
hstar (float, optional) – override hstar value for plotting water level in transient 1D inhomogeneities that use hstar, useful for plotting pretty cross-sections when reference level is not equal to 0.
sep (str) – Separator between parameters, either “, “ or “n”
**kwargs – passed on to all ax.plot calls
- Returns:
ax – axes with plot
- Return type:
matplotlib.Axes