#16865: Dot2tex reverses Poset.show() upside down
--------------------------------------+------------------------
       Reporter:  jmantysalo          |        Owner:
           Type:  defect              |       Status:  new
       Priority:  minor               |    Milestone:  sage-6.7
      Component:  packages: optional  |   Resolution:
       Keywords:  poset, dot2tex      |    Merged in:
        Authors:                      |    Reviewers:
Report Upstream:  N/A                 |  Work issues:
         Branch:                      |       Commit:
   Dependencies:                      |     Stopgaps:
--------------------------------------+------------------------

Comment (by nthiery):

 +1 to uniformly drawing posets with the top on top. This has annoyed
 me as well.

 For LaTeX / PDF output, this is taken care of by the `backward` option
 of `set_latex_options` in `Poset.hasse_diagram` (called by
 `Poset._latex_`).

 For plots, `Poset.plot` calls `Graph.plot` on the hasse diagram, and
 passes it by default the `layout=acyclic` option. The layout is then
 computed by `Graph.layout_acyclic` which in turn either calls
 `Graph.layout_acyclic_dummy` or `Graph.layout_graphviz` if `dot2tex`
 is available.

 It turns out that `Graph.layout_acyclic_dummy` orients edges pointing
 up, while, `Graph.layout_graphviz` uses the default behaviour of
 graphviz, namely to have edges pointing down. Hence the varying
 behaviour.


 Soo ... what's the cleanest way out?

 One strategy:

 - have an option in graphs stating whether the preferred acyclic
   layout is going up or down (a generalization of the `backward` trick
   in `set_latex_option`)

 - make sure both `layout_acyclic_dummy` and `layout_graphviz` honor
   this option.

 - configure this option appropriately in the construction of the Hasse
   diagram.

 Another strategy would be to set as default for all graphs that the
 acyclic layout shall be going up. That's simpler. But not consistent
 with graphviz. It also also a larger change for the users (but only
 those using acyclic layout and having dot2tex installed).


 What do you think?

 Cheers,
                                    Nicolas

--
Ticket URL: <http://trac.sagemath.org/ticket/16865#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to