Permalink
Browse files

top-to-bottom

  • Loading branch information...
cmungall committed Nov 18, 2010
1 parent 3e36c96 commit cb930ebb7f22b2270e7cfb88a77823ef665a2e42
Showing with 5 additions and 1 deletion.
  1. +5 −1 util/dot.pl
View
@@ -122,6 +122,7 @@
% translate Graph to dot, translate to an image format and write to File.
% if File is var, write to user_output
graph_to_dot_file(GraphTerm,Fmt,File):-
+ Opts=[], % TODO
(nonvar(Fmt) -> true ; Fmt=dot),
( nonvar(File) -> true ; tmp_file(Fmt,FileBase),concat_atom([FileBase,Fmt],'.',File)),
graph_to_dot_atom(GraphTerm,Dot),
@@ -133,7 +134,10 @@
told,
( Fmt=dot
-> true
- ; concat_atom([dot,'-o',File,'-T',Fmt,DotFile],' ',Cmd),
+ ; ( member(rankdir(RankDir),Opts)
+ -> true
+ ; RankDir='BT'),
+ concat_atom([dot,' -o ',File,' -Grankdir=',RankDir,' -T',Fmt,' ',DotFile],Cmd),
shell(Cmd)).

0 comments on commit cb930eb

Please sign in to comment.