Using sage 6.0, both posets display without crossings using the show()
method for me.
To generate tikz output use latex() -- personally, I think that this should
be a method but it isn't:
sage: P=Poset(([0,1,2],[[0,2],[1,2]]))
sage: P.show()
sage: latex(P)
\begin{tikzpicture}
%
\useasboundingbox (0,0) rectangle (5.0cm,5.0cm);
%
\definecolor{cv0}{rgb}{0.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
\definecolor{cv1}{rgb}{0.0,0.0,0.0}
\definecolor{cfv1}{rgb}{1.0,1.0,1.0}
\definecolor{clv1}{rgb}{0.0,0.0,0.0}
\definecolor{cv2}{rgb}{0.0,0.0,0.0}
\definecolor{cfv2}{rgb}{1.0,1.0,1.0}
\definecolor{clv2}{rgb}{0.0,0.0,0.0}
\definecolor{cv0v2}{rgb}{0.0,0.0,0.0}
\definecolor{cv1v2}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum
size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\hbox{$0$},x=0.0cm,y=0.0cm]{v0}
\Vertex[style={minimum
size=1.0cm,draw=cv1,fill=cfv1,text=clv1,shape=circle},LabelOut=false,L=\hbox{$1$},x=5.0cm,y=5.0cm]{v1}
\Vertex[style={minimum
size=1.0cm,draw=cv2,fill=cfv2,text=clv2,shape=circle},LabelOut=false,L=\hbox{$2$},x=2.5079cm,y=2.5085cm]{v2}
%
\Edge[lw=0.1cm,style={post, bend right,color=cv0v2,},](v0)(v2)
\Edge[lw=0.1cm,style={post, bend right,color=cv1v2,},](v1)(v2)
%
\end{tikzpicture}
Andrew
On Wednesday, 8 January 2014 19:10:01 UTC+1, [email protected] wrote:
>
> Is there an easy way to make tikz picture from sage poset? How about
> "prettyprinting" poset that can also be seen as lattice?
>
> To give concrete example:
>
> Poset(([0,1,2,3,4,5,6,7,8], [[0, 1], [0, 2], [0, 3], [0, 4], [0, 6], [0,
> 7], [1, 5], [2, 5], [3, 5], [4, 5], [5, 8], [6, 8], [7, 8]])).show()
> Poset(([0,2,3,4,5,6,7,8], [[0, 2], [0, 3], [0, 4], [0, 6], [0, 7], [2, 5],
> [3, 5], [4, 5], [5, 8], [6, 8], [7, 8]])).show()
>
> Second one seems quite good. But in first arrows 0->6 and 4->5
> crossed; that could be avoided by moving nodes 6 and 7 are to right.
>
> And then, is there automatic or semi-automatic way to convert
> lattice/poset/graph to tikz picture?
>
> Or to handle both at once: program that takes output of .cover_relations
> as input and .tex -code as output.
>
> --
> Jori M�ntysalo
>
--
You received this message because you are subscribed to the Google Groups
"sage-support" 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-support.
For more options, visit https://groups.google.com/groups/opt_out.