diff --git a/ogstools/meshplotlib/__init__.py b/ogstools/meshplotlib/__init__.py index 17498bba65329635341b4dfafbe50b3264caa8dc..e50d776f1f964a022e25d9ff3e8b97f8859d6431 100644 --- a/ogstools/meshplotlib/__init__.py +++ b/ogstools/meshplotlib/__init__.py @@ -4,7 +4,6 @@ from .plot_setup import _setup as setup # noqa: I001: noqa from .core import ( - plot_limit, plot_probe, plot, subplot, @@ -19,7 +18,6 @@ __all__ = [ "setup", "plot", "plot_contour", - "plot_limit", "plot_on_top", "plot_probe", "subplot", diff --git a/ogstools/meshplotlib/core.py b/ogstools/meshplotlib/core.py index 691dcc35688de8021101726230a4d659c203b3ef..a9e6a234ad03e7eb31e520e8d457319baf1a3355 100644 --- a/ogstools/meshplotlib/core.py +++ b/ogstools/meshplotlib/core.py @@ -634,35 +634,6 @@ def plot( return fig -def plot_limit( - mesh_series: MeshSeries, - mesh_property: Union[Property, str], - limit: Literal["min", "max"], - fig: Optional[mfigure.Figure] = None, - ax: Optional[plt.Axes] = None, -) -> mfigure.Figure: - """ - Plot the property limits through all timesteps of a MeshSeries. - - :param mesh_series: MeshSeries object containing the data to be plotted - :param property: The property field to be evaluated - :param limit: Type of limit to be computed - :param fig: Matplotlib Figure object to use for plotting (optional) - :param ax: Matplotlib Axis object to use for plotting (optional) - - :returns: A matplotlib Figure - """ - mesh = mesh_series.read(0) - mesh_property = get_preset(mesh_property, mesh) - func = {"min": np.min, "max": np.max}[limit] - vals = mesh_series.values(mesh_property.data_name) - func(vals, out=mesh[mesh_property.data_name], axis=0) - limit_property = mesh_property.replace( - output_name=limit + " " + mesh_property.output_name - ) - return plot(mesh, limit_property, fig=fig, ax=ax) - - def plot_probe( mesh_series: MeshSeries, points: np.ndarray,