Opened 14 years ago

Closed 14 years ago

#2134 closed enhancement (fixed)

[with patch; with positive review] arrows for digraphs

Reported by: rlm Owned by: was
Priority: major Milestone: sage-2.10.2
Component: graphics Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

note - author of patch doesn't give a hoot. do what you will with it, i won't touch it again. several things may break, for example, the only guaranteed color format is a float tuple. also, no new documentation.

everybody wants it, so here it is... :-D

Attachments (3)

arrows.patch (5.9 KB) - added by rlm 14 years ago.
arrows-2.patch (837 bytes) - added by rlm 14 years ago.
arrows-new.patch (6.7 KB) - added by rlm 14 years ago.
Apply this instead of the others.

Download all attachments as: .zip

Change History (11)

Changed 14 years ago by rlm

comment:1 Changed 14 years ago by was

  • Summary changed from arrows for digraphs to [with patch; needs review] arrows for digraphs

Note -- the author rlm of the patch was days without sleep at time of writing... :-)

Changed 14 years ago by rlm

comment:2 Changed 14 years ago by rlm

Oops, I touched it again... But this is after 14 straight hours of sleep.

comment:3 Changed 14 years ago by robertwb

Looking a bit at this patch, does NetworkX do much for graph drawing that we couldn't be doing ourselves with matplotlib. Right now, for instance, it doesn't play well with the 2d->3d command because you can't (easily) get at the primitives that make up a graph.

That being said, I think arrows are much nicer than sleeves.

comment:4 Changed 14 years ago by rlm

I might have the exact details wrong, but NetworkX uses pylab, which uses matplotlib. In fact, after trying to implement the arrows in NX, I think it would be easier to ultimately phase NX out of graph plotting completely. (After reimplementing the base structure, I'm starting to wonder how much NX we ultimately need...)

comment:5 Changed 14 years ago by robertwb

  • Summary changed from [with patch; needs review] arrows for digraphs to [with patch; with positive review] arrows for digraphs

Looks good to me. I've created a ticket for phasing NetworkX out of the graph plotting code: #2157, though I bet it implements lots of other useful stuff.

comment:6 Changed 14 years ago by mabshoff

Robert, the patch currently doesn't apply cleanly any more due to

changeset:   8329:657c0727bbd2
user:        Robert L. Miller <rlm@rlmiller.org>
date:        Thu Feb 07 00:18:51 2008 -0800
summary:     plot loops.

The issue is with the second hunk in sage/graphs/graph.py, so could you rebase the patch with your plot loop patch applied?

Cheers,

Michael

Changed 14 years ago by rlm

Apply this instead of the others.

comment:7 Changed 14 years ago by rlm

Rebased- in doing so, I uncovered two bugs: 1 Graphics import depended magically on it happening on another level 2 Arrow plotting would have crashed on plotting loops

Should now be ready to include.

comment:8 Changed 14 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 2.10.2.alpha0

Note: See TracTickets for help on using tickets.