Vincent, it seems that you are looking at the wrong section of the code. The line you referenced is specific to drawing directed graphs, and unfortunately in the current version (3.2.3) we are still using a direct call to NetworkX for the basic graph drawing. This call needs to be overwritten, and there are also a few objects now available in matplotlib (but not yet wrapped in sage) that have proven very useful in producing nice graph drawings.
This is something that I was working on very recently and I do have a lot of the necessary code already done. I apologize for not having basic multi-edge drawing merged already. (It's something that I am frustrated to say that I've implemented at least twice- the first time it was lost in a hard drive failure). This time, I got hung up on trying to do too big of an overhaul to graph plotting at once. I can separate out a smaller merge that would just add multi-edge plotting for now. I could actually have that up on trac by Tuesday. (I work 10-hour shifts each day until Monday, and this is something that will take some time to sit down and sort through the necessary pieces, as well as some clean up). If you'd like to code something yourself to have a little faster than I can get that patch up-- I was able to do a really quick and dirty implementation in a worksheet once, by just adding splines to the networkx drawing. (There is a spline function already in sage). I no longer have that available, but it is fairly easy to do just by iterating through all of your multiedges. One thing that was annoying is that it drew the splines on top of the vertices, but the ability to update zorder will be included in my patch as well. -ek On Jan 16, 12:11 am, Vincent D <20100.delecr...@gmail.com> wrote: > The code is in devel/sage/sage/graphs/graph.py > > The problematic line is just this one (line 5490 in devel/sage/sage/ > graphs/graph.py) : > > for u, v, _ in self.edge_iterator() : > if u != v : > p += arrow((pos[u][0], pos[u][1]), (pos[v][0], pos[v][1]), > **edge_style) > > I will try to fix it for multiedges graphs. > > Vincent D > > On 16 jan, 04:47, Jason Grout <jason-s...@creativetrax.com> wrote: > > > William Stein wrote: > > > So I strongly encourage you to do something about this, and can tell > > > you I think nobody else is working on it. Regarding finding the > > > code, it's probably somewhere in > > > SAGE_ROOT/devel/sage/sage/plot/ > > > but I'm not sure. You might try > > > sage: search_src? > > > I believe the plotting code is in devel/sage/sage/graphs/graph.py. Look > > at the plot function. > > > Jason --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---