From daebcf04ca0558c2f19ac60646d2e7adca8ef08a Mon Sep 17 00:00:00 2001 From: Lachlan Grose Date: Tue, 12 Oct 2021 09:38:34 +1100 Subject: [PATCH] fix: names kwarg wasn't used for multiple slices --- LoopStructural/visualisation/model_plotter.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/LoopStructural/visualisation/model_plotter.py b/LoopStructural/visualisation/model_plotter.py index bbf582110..76e25e427 100644 --- a/LoopStructural/visualisation/model_plotter.py +++ b/LoopStructural/visualisation/model_plotter.py @@ -279,6 +279,7 @@ def add_isosurface(self, slices_ = np.linspace(min_val + var * 0.05, max_val - var * 0.05, nslices) + base_name = kwargs.get('name',geological_feature.name) region = kwargs.get('region', None) if region is not None: @@ -307,10 +308,7 @@ def add_isosurface(self, logger.warning("Cannot isosurface {} at {}, skipping".format(geological_feature.name,isovalue)) continue - - name = geological_feature.name - name = kwargs.pop('name', name) - name += '_iso_%f' % isovalue + name += '{}_{}'.format(basename,isovalue) if names is not None and len(names) == len(slices_): name = names[i]