Commit 37e79e2b authored by Carsten Kemena's avatar Carsten Kemena

added shot legend option

parent d6742761
......@@ -116,6 +116,8 @@ def main( ) :
help="shape of the tree, circle or tree format")
parser.add_argument("-o", action="store", dest="outputname")
parser.add_argument("-y", action="store", type=str, dest="NodeIDtreeName", default=None, help="Name for output file that shows a tree with all node IDs.")
parser.add_argument("-l", dest="short_legend", help="Writes the legend in two levels for short trees", action="store_true")
params = parser.parse_args()
if params.NodeIDtreeName != None:
......@@ -235,12 +237,21 @@ def main( ) :
ts.legend.add_face(TextFace(' Fission ', fsize=16, fgcolor='DeepPink'), column=3)
ts.legend.add_face(CircleFace(10, "YellowGreen"), column=4)
ts.legend.add_face(TextFace(' Terminal Loss ', fsize=16, fgcolor='YellowGreen'), column=5)
ts.legend.add_face(CircleFace(10, "DarkBlue"), column=6)
ts.legend.add_face(TextFace(' Terminal Emergence ', fsize=16, fgcolor='DarkBlue'), column=7)
ts.legend.add_face(CircleFace(10, "Chocolate"), column=8)
ts.legend.add_face(TextFace(' Single Domain Loss ', fsize=16, fgcolor='Chocolate'), column=9)
ts.legend.add_face(CircleFace(10, "DeepSkyBlue"), column=10)
ts.legend.add_face(TextFace(' Single Domain Emergence ', fsize=16, fgcolor='DeepSkyBlue'), column=11)
if params.short_legend:
ts.legend.add_face(CircleFace(10, "DarkBlue"), column=0)
ts.legend.add_face(TextFace(' Terminal Emergence ', fsize=16, fgcolor='DarkBlue'), column=1)
ts.legend.add_face(CircleFace(10, "Chocolate"), column=2)
ts.legend.add_face(TextFace(' Single Domain Loss ', fsize=16, fgcolor='Chocolate'), column=3)
ts.legend.add_face(CircleFace(10, "DeepSkyBlue"), column=4)
ts.legend.add_face(TextFace(' Single Domain Emergence ', fsize=16, fgcolor='DeepSkyBlue'), column=5)
else:
ts.legend.add_face(CircleFace(10, "DarkBlue"), column=6)
ts.legend.add_face(TextFace(' Terminal Emergence ', fsize=16, fgcolor='DarkBlue'), column=7)
ts.legend.add_face(CircleFace(10, "Chocolate"), column=8)
ts.legend.add_face(TextFace(' Single Domain Loss ', fsize=16, fgcolor='Chocolate'), column=9)
ts.legend.add_face(CircleFace(10, "DeepSkyBlue"), column=10)
ts.legend.add_face(TextFace(' Single Domain Emergence ', fsize=16, fgcolor='DeepSkyBlue'), column=11)
ts.legend_position=1
ts.draw_guiding_lines = True
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment