@@ -57,6 +57,7 @@ def main():
57
57
--m_right=MARGIN right margin
58
58
--m_top=MARGIN top margin
59
59
--m_bot=MARGIN bottom margin
60
+ --font_name=F_NAME font name or path
60
61
--font_size=F_SIZE font size
61
62
62
63
Input format:
@@ -123,6 +124,8 @@ def main():
123
124
metavar = "MARGIN" )
124
125
win_opts .add_option ("--m_bot" , default = 100 , action = "store" , dest = "m_bot" , help = "bottom margin" , type = "int" ,
125
126
metavar = "MARGIN" )
127
+ win_opts .add_option ("--font_name" , default = "Arial" , action = "store" , dest = "font_name" , help = "font size" , type = "str" ,
128
+ metavar = "FONTNAME" )
126
129
win_opts .add_option ("--font_size" , default = 12 , action = "store" , dest = "font_size" , help = "font size" , type = "int" ,
127
130
metavar = "SIZE" )
128
131
@@ -155,13 +158,13 @@ def main():
155
158
run (labels , matrix , outfile = options .outfile , nexus_file = options .nexus_file , graph_file = options .graph_file ,
156
159
mode = options .mode , cutoff = options .cutoff , rooted = options .rooted , alt = options .alt , out_grp = out_grp ,
157
160
win_width = options .win_width ,win_height = options .win_height , m_left = options .m_left , m_right = options .m_right ,
158
- m_top = options .m_top , m_bot = options .m_bot ,font_size = options .font_size )
161
+ m_top = options .m_top , m_bot = options .m_bot , font_name = options . font_name , font_size = options .font_size )
159
162
160
163
161
164
def run (labels : [str ], matrix : [[float ]], outfile : str = "" , nexus_file : str = "" , graph_file : str = "" ,
162
165
mode : str = "CLS" , cutoff : float = 0.0 ,
163
166
rooted : bool = False , alt : bool = False , out_grp : Set [int ] = None , win_width : int = 1000 , win_height : int = 800 ,
164
- m_left : int = 100 , m_right : int = 100 , m_top : int = 100 , m_bot : int = 100 , font_size : int = 12 ) -> None :
167
+ m_left : int = 100 , m_right : int = 100 , m_top : int = 100 , m_bot : int = 100 , font_name : str = "Arial" , font_size : int = 12 ) -> None :
165
168
166
169
167
170
# distances.write(labels, matrix, outfile)
@@ -178,7 +181,7 @@ def run(labels: [str], matrix: [[float]], outfile: str = "", nexus_file: str = "
178
181
if graph_file != "" :
179
182
graph .write_tgf (outfile = graph_file )
180
183
181
- draw .draw (outfile , graph , angles , fit , win_width , win_height ,m_left , m_right , m_top , m_bot , font_size )
184
+ draw .draw (outfile , graph , angles , fit , win_width , win_height , m_left , m_right , m_top , m_bot , font_name , font_size )
182
185
183
186
184
187
if __name__ == '__main__' :
0 commit comments