#18046: Graphs with multiedges and latex
-------------------------------------+-------------------------------------
Reporter: jclaas | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.6
Component: graph theory | Resolution:
Keywords: graph-theory, | Merged in:
multiedges, latex, sd66 | Reviewers:
Authors: Jacob Laas | Work issues:
Report Upstream: N/A | Commit:
Branch: | b3721b4fd42959a87ee415643a44776d2e8d83c2
u/jclaas/graphs_with_multiedges_and_latex| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by jclaas):
Thanks for your feedback. Sorry for missing some of the style rules, but
some of the issues you raise are actually left over from previous work.
Regardless, I've tried to fix them the best I can.
Also, I'm happy to report that I've gotten custom {{{edge_thicknesses}}}
to work. It turned out that I just had to reverse the value of
multiedge_index. I didn't dive too deep to find out why, as there's
something like 27k lines of code I might have to search through.
> - These days I have been told that we should use
{{{isinstance(x,list)}}} instead of {{{type(x)}}} in [list].
Fixed.
> - Now, this file looks rather messy and you apparently tried to get your
code to 'fit in the local style'. It seems that they define a variable
named {{{number_types}}} that you could use.
Fixed.
> - {{{et}}} -> no short name please.
Fixed.
> - This line contains both {{{and}}} and {{{or}}}. Could you add
parentheses where they belong ?
Fixed.
> - Could you write the proper documentation (in the INPUT section of the
docstring) for the parameter {{{edge_thickness}}} in case of multiple
edges?
Fixed.
> - Your error message is misleading: it is not that multiple
customization of multiedges is impossible, it is that only {{{thickness}}}
can be set. At least, this is what your condition tests.
I've edited the message to read "Edge-specific colors are not available
for multiedges.", so that it only refers to the case of edge_colors, which
I wasn't up to the task of fixing immediately. The color issue seems like
a lot of work, because each vertex/edge color is specified via unique
{{{\definecolor{}{rgb}{}}}} latex definitions, instead of just passing
colors as strings. From what I can tell from the documentation (though I
don't understand French), tkz-graph understands colors as strings, so it
seems like the entire set of {{{\definecolor{}{rgb}{}}}} definitions are
unnecessary. Perhaps one should open a ticket just for updating this
feature? I could see an update to this being more useful for my own
purposes, but it also just seems better to just have colors specified
within each edge's tex-string.
> - What is the difference between {{{->}}} and {{{post}}} in TikZ? Why
did you make that change?
I don't know what {{{post}}} is, but I replaced it with {{{->}}} because
{{{post}}} doesn't respect line widths and it's not in the most recent
documentation (https://www.ctan.org/pkg/tkz-graph).
> - Is there any reason why you call
{{{self._graph.edge_label(edge[0],edge[1])}}}? That value should already
be equal to {{{e[2]}}}, shouldn't it?
Hmm that wasn't my doing, but I did find out that attempting to refer to
{{{e[2]}}} absolutely doesn't maintain the order in which the edge labels
are called, which I find very bizarre. Leaving it as-is will at least
ensure that my fix for {{{edge_thicknesses}}} works properly.
--
Ticket URL: <http://trac.sagemath.org/ticket/18046#comment:8>
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.