Skip to content

Commit

Permalink
fix: return cmap not array of colours
Browse files Browse the repository at this point in the history
  • Loading branch information
lachlangrose committed Oct 23, 2024
1 parent 7e48b9e commit 6d0a408
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions loopstructuralvisualisation/_3d_viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _build_stratigraphic_cmap(self, model):
data.append((v["id"], v["colour"]))
colours.append(v["colour"])
boundaries.append(v["id"]) # print(u,v)
cmap = colors.ListedColormap(colours).colors
cmap = colors.ListedColormap(colours)
except ImportError:
logger.warning("Cannot use predefined colours as I can't import matplotlib")
cmap = "tab20"
Expand Down Expand Up @@ -433,7 +433,7 @@ def plot_model_surfaces(
strati_surfaces = []
surfaces = model.get_stratigraphic_surfaces()
if cmap is None:
cmap = self._build_stratigraphic_cmap(model)
cmap = self._build_stratigraphic_cmap(model).colors
for s in surfaces:
strati_surfaces.append(s.vtk())
if name is None:
Expand Down

0 comments on commit 6d0a408

Please sign in to comment.