From 397f53582ce32cfa7501202b77973194a1f1072f Mon Sep 17 00:00:00 2001
From: FZill <florian.zill@ufz.de>
Date: Thu, 21 Mar 2024 12:45:26 +0100
Subject: [PATCH] [meshplotlib] removed plot_limit

---
 ogstools/meshplotlib/__init__.py |  2 --
 ogstools/meshplotlib/core.py     | 29 -----------------------------
 2 files changed, 31 deletions(-)

diff --git a/ogstools/meshplotlib/__init__.py b/ogstools/meshplotlib/__init__.py
index 17498bba6..e50d776f1 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 691dcc356..a9e6a234a 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,
-- 
GitLab