#14594: Make dot2tex work with matplotlib 1.2.x (as well as older versions)
------------------------------------------+--------------------------------
Reporter: aschilling | Owner: sage-combinat
Type: defect | Status: closed
Priority: critical | Milestone: sage-5.10
Component: packages: optional | Resolution: fixed
Keywords: dot2tex spkg pyparsing | Merged in:
Authors: Leif Leonhardy | Reviewers: Travis Scrimshaw
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
------------------------------------------+--------------------------------
Comment (by slabbe):
Replying to [comment:63 stumpc5]:
> I just ran into that issue -- are there any solutions so far?
I just tried an ugly monkey fix which worked. First I did {{{sage -i
pyparsing}}} and in my case that package was already installed.
Then, I edited the file {{{/Users/slabbe/Applications/sage-
git/local/lib/python2.7/site-packages/dot2tex/dotparsing.py}}} in the
following way:
{{{
#!diff
26,27c26,30
- import matplotlib.pyparsing as pyparsing
- # just raise if that failed, too
+ try:
+ import matplotlib.pyparsing as pyparsing
+ except ImportError:
+ import pyparsing
+ # just raise if that failed, too
36c39
- ParseException, ParseResults, CharsNotIn, _noncomma,
dblQuotedString, QuotedString, ParserElement,
+ ParseException, ParseResults, CharsNotIn, dblQuotedString,
QuotedString, ParserElement,
}}}
Then, I tested this example:
{{{
#!python
sage: G = DiGraph()
sage: G.add_edge(3333, 88, 'my_label')
sage: G.set_latex_options(format='dot2tex')
sage: view(G)
}}}
and it worked again.
--
Ticket URL: <http://trac.sagemath.org/ticket/14594#comment:64>
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.