Hi Martin, Hi Rado,

Full featured latex output with the possibility to fine touch the
layout computed by graphviz using a graphical tool would be a killer
feature we have been dreaming for long! The trick below is a step in
that direction :-)

On Tue, Mar 01, 2011 at 06:15:06PM +0100, Martin Rubey wrote:
> the following worked for me:
> 
> H = P.hasse_diagram()
> d = dict((v.vertex, pretty_print(v.element)) for v in P)

Can you give a complete example? With the poset I have tried
(posets.IntegerPartitions(6)), pretty_print always returns None, so
the relabelling above was non functional. On the other hand, using
str(v.element) worked.

> H.relabel(d)
> D = DiGraph(H, pos=H.layout_graphviz())
> graph_editor(D)

You could also do:

    sage: H.layout(layout="acyclic", save_pos=True)
    sage: graph_editor(H)

Future improvements:

 - Display labels in graph_editor
 - Handle properly complicated LaTeX labels (the call to layout could
   take arguments stating to use the full dot2tex machinery to compute
   appropriate bounding boxes for the nodes and edges)
 - Make graph_editor available from Sage's text interface. One should
   be able to call the java applet from there, no?
 - Save back the layout in the original graph being edited, instead of
   creating a new graph, in order to not loose information in the process.

> one more question: there appear two sliders "length" and "strength" but
> they don't seem to do anything.  What should they be doing?

Those are used if you check the "live" spring layout.

> Many thanks Rado!

+1

Cheers,
                                Nicolas
--
Nicolas M. ThiƩry "Isil" <nthi...@users.sf.net>
http://Nicolas.Thiery.name/

-- 
You received this message because you are subscribed to the Google Groups 
"sage-combinat-devel" group.
To post to this group, send email to sage-combinat-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-combinat-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sage-combinat-devel?hl=en.

Reply via email to