forked from OpenSDV/Linux_Kernel_map4vehicle
*fontsize
This commit is contained in:
parent
11f1f1db5e
commit
3443a99f00
|
@ -702,9 +702,11 @@ def write_dot(g, dot):
|
||||||
dot.write("{ rank=same %s }\n" %
|
dot.write("{ rank=same %s }\n" %
|
||||||
(' '.join(['"%s"' % (str(a)) for a in ranks[r]])))
|
(' '.join(['"%s"' % (str(a)) for a in ranks[r]])))
|
||||||
for n in g.nodes():
|
for n in g.nodes():
|
||||||
prop = Munch()
|
prop = Munch(g.node[n])
|
||||||
if scaled and len(ranks):
|
if scaled and len(ranks):
|
||||||
prop.fontsize = 500 + 10000 / (len(ranks[rank(g, n)]) + 1)
|
prop.fontsize = 500 + 10000 / (len(ranks[rank(g, n)]) + 1)
|
||||||
|
prop.fontsize = 30 + min(5 * len(g.edges(n)), 50)
|
||||||
|
|
||||||
# prop.label = n + ' ' + str(rank(g,n))
|
# prop.label = n + ' ' + str(rank(g,n))
|
||||||
if prop:
|
if prop:
|
||||||
dot.write('"%s" [%s]\n' % (re.escape(n), ','.join(
|
dot.write('"%s" [%s]\n' % (re.escape(n), ','.join(
|
||||||
|
|
Loading…
Reference in New Issue