@@ -923,8 +923,13 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False,
923
923
prefix = ' '
924
924
if hierarchy is None :
925
925
hierarchy = []
926
- colorset = ['#FFFFC8' , '#0000FF' , '#B4B4FF' , '#E6E6FF' , '#FF0000' ,
927
- '#FFB4B4' , '#FFE6E6' , '#00A300' , '#B4FFB4' , '#E6FFE6' ]
926
+ colorset = ['#FFFFC8' , # Y
927
+ '#0000FF' , '#B4B4FF' , '#E6E6FF' , # B
928
+ '#FF0000' , '#FFB4B4' , '#FFE6E6' , # R
929
+ '#00A300' , '#B4FFB4' , '#E6FFE6' , # G
930
+ '#0000FF' , '#B4B4FF' ] # loop B
931
+ if level > len (colorset ) - 2 :
932
+ level = 3 # Loop back to blue
928
933
929
934
dotlist = ['%slabel="%s";' % (prefix , self .name )]
930
935
for node in nx .topological_sort (self ._graph ):
@@ -963,8 +968,6 @@ def _get_dot(self, prefix=None, hierarchy=None, colored=False,
963
968
colored = colored ,
964
969
simple_form = simple_form , level = level + 3 ))
965
970
dotlist .append ('}' )
966
- if level == 6 :
967
- level = 2
968
971
else :
969
972
for subnode in self ._graph .successors_iter (node ):
970
973
if node ._hierarchy != subnode ._hierarchy :
0 commit comments