diff --git a/ogstools/meshlib/mesh_series.py b/ogstools/meshlib/mesh_series.py index dbbc86706a9bdcea3a0d30936a1d6c8743a27c2a..d43f396541e919545b9263f3cf3650a2d2c620bb 100644 --- a/ogstools/meshlib/mesh_series.py +++ b/ogstools/meshlib/mesh_series.py @@ -21,9 +21,7 @@ class MeshSeries: """ def __init__( - self, - filepath: Union[str, Path], - time_unit: Optional[Optional[str]] = None, + self, filepath: Union[str, Path], time_unit: Optional[str] = "s" ) -> None: """ Initialize a MeshSeries object diff --git a/ogstools/meshplotlib/core.py b/ogstools/meshplotlib/core.py index 53dc33132a8aa34b800740af9540096dd62c926f..134d156b34e7ffc6a4f5b34a3b1111ffd0f267f2 100644 --- a/ogstools/meshplotlib/core.py +++ b/ogstools/meshplotlib/core.py @@ -526,7 +526,7 @@ def plot_probe( points: np.ndarray, mesh_property: Union[Property, str], labels: Optional[list[str]] = None, - time_unit: Optional[str] = None, + time_unit: Optional[str] = "s", interp_method: Optional[Literal["nearest", "linear", "probefilter"]] = None, interp_backend_pvd: Optional[Literal["vtk", "scipy"]] = None, colors: Optional[list] = None, @@ -546,7 +546,8 @@ def plot_probe( `linear` for xdmf MeshSeries and `probefilter` for pvd MeshSeries. :param interp_backend: Interpolation backend for PVD MeshSeries. - :param kwargs: Keyword arguments passed to the plot function. + :param kwargs: Keyword arguments passed to matplotlib's plot + function. :returns: A matplotlib Figure """ diff --git a/tests/test_meshplotlib.py b/tests/test_meshplotlib.py index d75bf6541ebd5fa4f4d4048595653033f89ab401..e74feedaaf4cbbadc882df0a933d64e335385808 100644 --- a/tests/test_meshplotlib.py +++ b/tests/test_meshplotlib.py @@ -92,7 +92,6 @@ class MeshplotlibTest(unittest.TestCase): def test_plot_probe(self): """Test creation of probe plots.""" - setup.reset() mesh_series = examples.meshseries_THM_2D points = mesh_series.read(0).center plot_probe(mesh_series, points, presets.temperature)