networkx - change node size based on list or dictionary value
I'm trying to make a graph in networkx. I'm having trouble assigning different node sizes to the nodes. Here is my code I've been playing with: import sys from collections import defaultdict import networkx as nx import matplotlib.pyplot as plt inp = sys.argv[1] cluster = sys.argv[1] + ".cluster" counts = sys.argv[1] + ".counts" with open(cluster, "r") as f1: edges = [line.strip().split('\t') for line in f1] with open(counts, "r") as f2: countsdic = defaultdict(list) for line in f2: k,v = line.strip().split() countsdic[k].append(v) tmp = [] for el in sum(edges, []): tmp.append(el) nodes = []