#3541 closed enhancement (fixed)
[with patch, positive review] graph multiedge plotting
Reported by: | ekirkman | Owned by: | ekirkman |
---|---|---|---|
Priority: | major | Milestone: | sage-3.3 |
Component: | graph theory | Keywords: | |
Cc: | rlm, mabshoff | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Wanted: New code to make a pretty plot of graphs with multiedges. I'm working on a patch now and will post it soon.
Attachments (5)
Change History (21)
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
Some code from Ashley Saunders up at http://wiki.wstein.org/2008/480a/theprojects
comment:3 Changed 13 years ago by
- Owner changed from rlm to ekirkman
comment:4 Changed 13 years ago by
- Milestone set to sage-3.1.3
comment:5 Changed 13 years ago by
This set of patches should fix #5248.
Changed 13 years ago by
comment:6 Changed 13 years ago by
- Summary changed from graph multiedge plotting to [with patch, positive review] graph multiedge plotting
This is still a little quirky, due to issues with #4774, but it will be great to get this merged. The only problems left are on a different ticket.
+ exp[(10!)^{(10!)] }
comment:7 Changed 13 years ago by
Apply both patches in order.
comment:8 Changed 13 years ago by
- Milestone changed from sage-3.4.1 to sage-3.3
This is going into 3.3.
Cheers,
Michael
comment:9 Changed 13 years ago by
- Cc mabshoff added
- Summary changed from [with patch, positive review] graph multiedge plotting to [with patch, needs tiny review (2 lines) on third patch only] graph multiedge plotting
I caught some things while looking at the plots. It should be a pretty quick review-- hopefully I got it in fast enough.
comment:10 Changed 13 years ago by
- Summary changed from [with patch, needs tiny review (2 lines) on third patch only] graph multiedge plotting to [with patch, positive review] graph multiedge plotting
comment:11 Changed 13 years ago by
What is the credit situation here? I assume Emily as author, Robert for review?
Cheers,
Michael
comment:12 Changed 13 years ago by
There is one doctest failure:
mabshoff@sage:/scratch/mabshoff/sage-3.3.rc1$ ./sage -t -long devel/sage/sage/combinat/crystals/crystals.py sage -t -long "devel/sage/sage/combinat/crystals/crystals.py" ********************************************************************** File "/scratch/mabshoff/sage-3.3.rc1/devel/sage/sage/combinat/crystals/crystals.py", line 553: sage: C.plot() Expected: Graphics object consisting of 11 graphics primitives Got: Graphics object consisting of 17 graphics primitives **********************************************************************
I assume this is becase previously the graph was incorrect.
Cheers,
Michael
comment:13 Changed 13 years ago by
After checking with Mike Hansen he gave me the thumbs up for the change, so I will post a tiny reviewer patch in a second. Note that trac_3541_tinyfixes.patch is a diff, but I committed in Emily's name :)
Cheers,
Michael
Changed 13 years ago by
comment:14 Changed 13 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged
- trac_3541-multiedge-1.patch
- trac_3541_beezy.patch
- trac_3541_tinyfixes.patch
- trac_3541-reviewer-doctest.patch
in Sage 3.3.rc1. :)
Cheers,
Michael
comment:15 Changed 13 years ago by
Emily wrote all that by herself. I only reviewed and helped her with matplotlib.
comment:16 Changed 13 years ago by
Uploaded an image of a sample plot of a multi-edge graph. The graph was produced using the following code from the docstring of sage.graphs.graph.GenericGraph.plot
:
sage: g = Graph({}, loops=True, multiedges=True) sage: g.add_edges([(0,0,'a'),(0,0,'b'),(0,1,'c'),(0,1,'d'), ... (0,1,'e'),(0,1,'f'),(0,1,'f'),(2,1,'g'),(2,2,'h')]) sage: g.plot(edge_labels=True, color_by_label=True, edge_style='dashed')
I uploaded the image here, so it can be referred to in the release tour of 3.3.
Awesome!