diff --git a/wholeslidedata/visualization/plotting.py b/wholeslidedata/visualization/plotting.py index e4b9c832..edd12215 100644 --- a/wholeslidedata/visualization/plotting.py +++ b/wholeslidedata/visualization/plotting.py @@ -69,6 +69,9 @@ def plot_annotations( ax.scatter(*coordinates, color=color) elif isinstance(annotation, PolygonAnnotation): ax.plot(*list(zip(*coordinates)), color=color, linewidth=2) + holes = [np.array(hole) * scale for hole in annotation.holes] + for hole in holes: + ax.plot(*list(zip(*hole)), color=color, linewidth=2) else: raise ValueError(f"invalid annotation {type(annotation)}")