From 87a72d64e4b804ce8c1145a6699dae95d1d8cdef Mon Sep 17 00:00:00 2001 From: Panos Mavrogiorgos Date: Thu, 30 May 2024 16:11:28 +0300 Subject: [PATCH] feat: Improve `.plot()` performance when `show_nodes/show_mesh` is True. At least on my laptop when both flags are True, this improves performance by 0.8 seconds on v1.0 and by 1.5 seconds on STOFS-3D-Atl. --- thalassa/plotting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thalassa/plotting.py b/thalassa/plotting.py index 22764d3..e85ca88 100644 --- a/thalassa/plotting.py +++ b/thalassa/plotting.py @@ -186,10 +186,10 @@ def plot( tiles = api.get_tiles() components = [tiles, raster] if show_mesh: - mesh = api.get_wireframe(ds, x_range=x_range, y_range=y_range, hover=False) + mesh = api.get_wireframe(trimesh, x_range=x_range, y_range=y_range, hover=False) components.append(mesh) if show_nodes: - nodes = api.get_nodes(ds, x_range=x_range, y_range=y_range, hover=True, size=node_size) + nodes = api.get_nodes(trimesh, x_range=x_range, y_range=y_range, hover=True, size=node_size) components.append(nodes) overlay = hv.Overlay(components) dmap = overlay.collate()