Commit 181004ce authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain

left_to_right

parent aeb12353
......@@ -12,6 +12,7 @@
).
:- use_module(doc).
:- use_module(biocham).
:- devdoc('\\section{Commands}').
......@@ -20,10 +21,15 @@
draw_graph :-
biocham_command,
doc('Draws the current graph.'),
option(left_to_right, yesno, _LeftToRight, 'Draws the graph from left to
right instead of the default top to bottom.'),
get_current_graph(Id),
draw_graph(Id).
:- initial(option(left_to_right: no)).
export_graph(OutputFile) :-
biocham_command,
type(OutputFile, output_file),
......@@ -100,6 +106,14 @@ create_cgraph(Id, Graph) :-
agattr(Graph, edge, color, 'black', _),
agattr(Graph, edge, dir, 'forward', _),
agsubg(Graph, 'source', true, Source),
get_option(left_to_right, LR),
(
LR == yes
->
agattr(Graph, graph, rankdir, 'LR', _)
;
true
),
agattr(Source, graph, rank, 'min', _),
\+ (
item([parent: Id, kind: vertex, item: VertexName, id: VertexId]),
......
......@@ -28,8 +28,8 @@ up_type(present).
up_type(sources).
:- doc('Defines if some places are forcefully put on top of the graph when
drawing it with Graphviz. \\emphright{The default value is \\texttt{none}}').
:- doc('\\emphright{Defines if some places are forcefully put on top of the
graph when drawing it with Graphviz. The default value is \\texttt{none}}').
:- initial(option(force_up: none)).
......@@ -76,12 +76,12 @@ reaction_graph :-
at the top of the graph when drawing it.'),
doc('Builds the reaction graph of the current model.
\\begin{example}'),
biocham(option(force_up: present)),
biocham(option(force_up: present, left_to_right: yes)),
biocham(draw_reactions),
% biocham(option(force_up: sources)),
% biocham(draw_reactions),
doc('\\end{example}'),
biocham_silent(option(force_up: none)),
biocham_silent(option(force_up: none, left_to_right: no)),
delete_items([kind: graph, key: reaction_graph]),
new_graph,
set_graph_name(reaction_graph),
......
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