Skip to content

Commit

Permalink
feat: Improve .plot() performance when show_nodes/show_mesh is True.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
pmav99 committed May 30, 2024
1 parent dff6331 commit 87a72d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions thalassa/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 87a72d6

Please sign in to comment.