#14594: Make dot2tex work with matplotlib 1.2.x (as well as older versions)
------------------------------------------+---------------------------------
Reporter: aschilling | Owner: sage-combinat
Type: defect | Status: needs_info
Priority: critical | Milestone: sage-5.10
Component: packages: optional | Resolution:
Keywords: dot2tex spkg pyparsing | Work issues: Update `SPKG.txt`,
add `src/` to `.hgignore`, probably remove upstream history
Report Upstream: N/A | Reviewers: Travis Scrimshaw
Authors: Leif Leonhardy | Merged in:
Dependencies: | Stopgaps:
------------------------------------------+---------------------------------
Comment (by leif):
Replying to [comment:31 aschilling]:
> > ... but I also get five pop-up windows showing `sage.pdf`! XD
Rerunning the tests of the Sage library with
`--optional=dot2tex,graphviz,sage` (i.e., this time also `graphviz`), I
get ''eleven'' pop-up windows.
[[BR]]
> Leif, thanks for the report! Are you saying that the tags in the code
are wrong?
IMHO yes. Some tests marked optional depend on data that's not defined
unless one also specifies `sage`. I'm not entirely sure whether the
''behaviour'' w.r.t. that changed with the new doctesting framework (in
Sage 5.9 and later); the (syntax of the) options to `sage -t ...` did.
[[BR]]
> The view commands in the code make the pdf files, but they are supposed
to show pictures (not just `sage.pdf`).
Yes, I of course meant I get the generated PDFs shown (entitled
`sage.pdf`), but that shouldn't happen when doctesting.
----
For completeness (Sage library with `[--long]
--optional=dot2tex,graphviz,sage`):
{{{
**********************************************************************
File "devel/sage/sage/graphs/graph_latex.py", line 1325, in
sage.graphs.graph_latex.GraphLatex.dot2tex_picture
Failed example:
print g.latex_options().dot2tex_picture() # optional - dot2tex
graphviz
Expected:
\begin{tikzpicture}[>=latex,line join=bevel,]
%%
\node (0+1) at (...bp,...bp) [draw,draw=none] {$\left(\text{0},
1\right)$};
\node (0+0) at (...bp,...bp) [draw,draw=none] {$\left(\text{0},
0\right)$};
\node (1+0) at (...bp,...bp) [draw,draw=none] {$\left(\text{1},
0\right)$};
\node (1+1) at (...bp,...bp) [draw,draw=none] {$\left(\text{1},
1\right)$};
\draw [->] (1+0) ..controls (...bp,...bp) and (...bp,...bp) ..
(0+1);
\draw [->] (0+0) ..controls (...bp,...bp) and (...bp,...bp) ..
(0+1);
\draw [->] (0+0) ..controls (...bp,...bp) and (...bp,...bp) ..
(1+1);
\draw [->] (1+0) ..controls (...bp,...bp) and (...bp,...bp) ..
(1+1);
%
\end{tikzpicture}
Got:
<BLANKLINE>
\begin{tikzpicture}[>=latex,line join=bevel,]
%%
\node (0+0) at (14bp,63bp) [draw,draw=none] {$\left(0, 0\right)$};
\node (0+1) at (60bp,9bp) [draw,draw=none] {$\left(0, 1\right)$};
\node (1+0) at (60bp,63bp) [draw,draw=none] {$\left(1, 0\right)$};
\node (1+1) at (14bp,9bp) [draw,draw=none] {$\left(1, 1\right)$};
\draw [black,->] (0+0) ..controls (29bp,46bp) and (38bp,35bp) ..
(0+1);
\draw [black,->] (1+0) ..controls (45bp,46bp) and (36bp,35bp) ..
(1+1);
\draw [black,->] (0+0) ..controls (14bp,47bp) and (14bp,37bp) ..
(1+1);
\draw [black,->] (1+0) ..controls (60bp,47bp) and (60bp,37bp) ..
(0+1);
%
\end{tikzpicture}
<BLANKLINE>
**********************************************************************
}}}
[[BR]]
And this is the ''only one'' I get because of missing LaTeX packages:
{{{
**********************************************************************
File "devel/sage/sage/combinat/posets/posets.py", line 1087, in
sage.combinat.posets.posets.FinitePoset._latex_
Failed example:
print P._latex_() #optional - dot2tex graphviz
Expected:
\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{cv0v1}{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{$1$},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{$2$},x=5.0cm,y=5.0cm]{v1}
%
\Edge[lw=0.1cm,style={post, bend right,color=cv0v1,},](v0)(v1)
%
\end{tikzpicture}
Got:
<BLANKLINE>
Warning: `tkz-graph.sty` is not part of this computer's TeX
installation.
This package is required to render graphs in LaTeX.
Visit 'http://altermundus.com/pages/graph.html'.
<BLANKLINE>
<BLANKLINE>
Warning: `tkz-berge.sty` is not part of this computer's TeX
installation.
This package is required to render graphs in LaTeX.
Visit 'http://altermundus.com/pages/graph.html'.
<BLANKLINE>
\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{cv0v1}{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{$1$},x=5.0cm,y=0.0cm]{v0}
\Vertex[style={minimum
size=1.0cm,draw=cv1,fill=cfv1,text=clv1,shape=circle},LabelOut=false,L=\hbox{$2$},x=0.0cm,y=5.0cm]{v1}
%
\Edge[lw=0.1cm,style={post, bend right,color=cv0v1,},](v0)(v1)
%
\end{tikzpicture}
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14594#comment:32>
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.