[2Dplot] works, not tested with zoom, though

This commit is contained in:
2021-02-27 17:27:50 +01:00
parent b0c020891f
commit 17b3e99d43
2 changed files with 7 additions and 6 deletions

View File

@@ -276,8 +276,8 @@ class FileHandler(metaclass=Singleton):
dim = da.dimensions[dimension_index]
if dim.dimension_type == nix.DimensionType.Set:
labels = dim.labels
if start + count > len(labels):
raise ValueError("Invalid argument for start, count for SetDimension")
if len(labels) > 0 and start + count > len(labels):
raise ValueError("Invalid argument for start or count for SetDimension")
axis = labels[start:start + count]
if len(labels) == 0:
axis = list(map(str, range(start, start+count)))