From 1314813485e61062ebdd06d3ea4d01e852d13fcd Mon Sep 17 00:00:00 2001 From: MichaMans Date: Mon, 25 Jun 2018 17:48:40 +0200 Subject: [PATCH] #5 reverted and added elif for plotting unconnected nodes --- uesgraphs/visuals.py | 2 ++ 1 file changed, 2 insertions(+) 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']