"Nicolas M. Thiery" <nicolas.thi...@u-psud.fr> writes: > 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!
Yes, me too! However, in the example at hand, even with a poset having only 40 elements, it turned out less useful than I thought. When I looked at the print out, I thought: hey, just move this vertex there and that one here and it will look much better. But in reality, it was not that so. On the other hand, I would not have learned that without being able to try it... > 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. Sorry, I forgot to say that pretty_print was a function I defined myself. (I didn't realise that it's also a predefined function.) It just returns an element of Tableau. >> 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) Oh, thanks! > 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) BTW, I had problems (i.e., I could not) displaying a poset having graphs as vertices. I'll post an example as soon as I can. > - Make graph_editor available from Sage's text interface. One should > be able to call the java applet from there, no? That would be really important to me. I don't want to use the notebook. All the best and thanks again, Martin -- 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.