diff --git a/uesgraphs/visuals.py b/uesgraphs/visuals.py index 71b2ed1..6ad9263 100644 --- a/uesgraphs/visuals.py +++ b/uesgraphs/visuals.py @@ -210,6 +210,8 @@ def _place_text(self, element): '--', color='black', alpha=0.7) + elif len(neighbors) == 0: + text_pos = self.uesgraph.node[node]['position'] else: neighbor_pos = self.uesgraph.node[neighbors[0]]['position']