Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion astrodendro/plot.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Licensed under an MIT open source license - see LICENSE

import numpy as np
from .structure import Structure


class DendrogramPlotter(object):
Expand Down Expand Up @@ -190,7 +191,11 @@ def get_lines(self, structures=None, subtree=True, **kwargs):
# Case 2: one structure is selected, and subtree is True
else:
if subtree:
if type(structures[0]) is int:
if isinstance(structures, int):
structure = self.dendrogram[structures]
elif isinstance(structures, Structure):
structure = structures
elif isinstance(structures[0], int):
structure = self.dendrogram[structures[0]]
else:
structure = structures[0]
Expand Down