diff --git a/caliGraph.py b/caliGraph.py index f1ecf04..6a07968 100755 --- a/caliGraph.py +++ b/caliGraph.py @@ -554,10 +554,11 @@ def analyze(G, type_name, name, dist=2.7): scaleBooksByRating(G) scaleOpinionsByRating(G) - match['value'] = 100 + #match['value'] = 100 if not 'shape' in match: match['shape'] = 'star' addScoreToLabels(G) + match['label'] = "*"+match['label']+"*" def pruneDist(G, node, n, dist, menge, firstEdge=False): if dist <= 0: @@ -565,6 +566,10 @@ def pruneDist(G, node, n, dist, menge, firstEdge=False): dist -= 1 if menge==set(): firstEdge=True + if node['t'] in ['topList']: + if firstEdge: + menge.add(n) + return menge.add(n) if node['t'] in ['tag']: if firstEdge: @@ -575,7 +580,7 @@ def pruneDist(G, node, n, dist, menge, firstEdge=False): keeplist = [] for m in list(G.adj[n]): book = G.nodes[m] - if book['t'] not in ['topList']: + if book['t'] not in ['NOTHING']: if 'score' in book and book['score'] != None: bestlist.append(book) elif 'rating' in book and book['rating'] != None: