Opened 10 years ago
Closed 7 years ago
#5938 closed defect (duplicate)
graph plotting -- ploting of graphs (networks) is somehow messed up/scaled wrong/cropped wrong since it doesn't work with graphics_array
Reported by: | was | Owned by: | rlm |
---|---|---|---|
Priority: | major | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graph theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | Jason Grout | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
Want to see some truly hideous plotting output? Try this:
Q = GraphQuery(display_cols=['graph6','num_vertices','degree_sequence'],num_edges=['<=',5],min_degree=1) v = Q.get_graphs_list(); v graphics_array([g.plot() for g in v], 3, len(v)//3).show()
I guess the problem is maybe Networkx drawing the plots instead of Sage (??), hence the cropping/layout is wrong? I don't know. Why do we use networkx at all for any part of plotting? It would be better to plot to native Sage primitives, wouldn't it?
Fixed by #9211.
Change History (11)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
And even this results in bits being chopped off that shouldn't be!
for g in v[:5]: show(g)
comment:3 Changed 10 years ago by
I'm still working on this, but I have some updates. It looks like the first problem is the buffer size on scatter_plot. It's including the points, but not the vertex radius of the outermost points. That should be simple enough to fix, but then I'll also look at some auto-scaling to make the graphics_array a little nicer. I also feel like the graphs_list module had some nice parameters for graphics_arrays of graphs, but they might be outdated now that graph plotting is native in Sage. I'll check into that too though.
comment:4 Changed 10 years ago by
comment:5 Changed 9 years ago by
- Report Upstream set to N/A
<vent> THIS SUCKS!!!!!!!!!!!
I can't believe how annoying it is that plotting graphs is still so totally and completely broken. It is really, really horrible. I don't know how anybody can stand this.
Frickin' a. Every single graph plot I try has the borders chopped off. E.g.,
sage: Q = GraphQuery(display_cols=['graph6','num_vertices','degree_sequence'], num_edges=['<=',5],min_degree=1) sage: Q.show(with_picture=True) [[hideous pain]]
comment:6 Changed 9 years ago by
Fix it!
comment:7 Changed 9 years ago by
Warning- I've seen several "fixes" for this go in, and yet it's still borken
comment:8 Changed 9 years ago by
See #9211 for progress towards a fix.
comment:9 Changed 7 years ago by
- Status changed from new to needs_review
Graph vertices are not cut off anymore. The plot in the description has overlapping vertices, though.
comment:10 Changed 7 years ago by
- Milestone changed from sage-4.8 to sage-duplicate/invalid/wontfix
- Status changed from needs_review to positive_review
This is a dup of #9211. Since the patch is there, and it is already merged, I'm calling this the duplicate.
comment:11 Changed 7 years ago by
- Description modified (diff)
- Resolution set to duplicate
- Reviewers set to Jason Grout
- Status changed from positive_review to closed
Even this (following the above example), results in hideous mis-cropped plots, and it doesn't use graphics array at all: