@@ -902,8 +902,13 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False,
902
902
prefix = ' '
903
903
if hierarchy is None :
904
904
hierarchy = []
905
- colorset = ['#FFFFC8' , '#0000FF' , '#B4B4FF' , '#E6E6FF' , '#FF0000' ,
906
- '#FFB4B4' , '#FFE6E6' , '#00A300' , '#B4FFB4' , '#E6FFE6' ]
905
+ colorset = ['#FFFFC8' , # Y
906
+ '#0000FF' , '#B4B4FF' , '#E6E6FF' , # B
907
+ '#FF0000' , '#FFB4B4' , '#FFE6E6' , # R
908
+ '#00A300' , '#B4FFB4' , '#E6FFE6' , # G
909
+ '#0000FF' , '#B4B4FF' ] # loop B
910
+ if level > len (colorset ) - 2 :
911
+ level = 3 # Loop back to blue
907
912
908
913
dotlist = ['%slabel="%s";' % (prefix , self .name )]
909
914
for node in nx .topological_sort (self ._graph ):
@@ -942,8 +947,6 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False,
942
947
colored = colored ,
943
948
simple_form = simple_form , level = level + 3 ))
944
949
dotlist .append ('}' )
945
- if level == 6 :
946
- level = 2
947
950
else :
948
951
for subnode in self ._graph .successors_iter (node ):
949
952
if node ._hierarchy != subnode ._hierarchy :
0 commit comments