Ask Your Question

Change the edge thickness in a graph plot

asked 2016-01-17 07:23:52 -0500

lutherdriggers gravatar image

updated 2016-01-18 05:23:17 -0500

I want to plot a graph with many edges, but they just end up looking like a black mass. I can see how to change vertex size and whatnot but not edge thickness.

sage: H=graphs.CompleteGraph(100)
Launched png viewer for Graphics object consisting of 5051 graphics primitives

Not sure where my karma went, but you can guess what this looks like.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-18 05:21:09 -0500

lutherdriggers gravatar image

I figured it out. The answer is do not use GraphPlot. Use GraphLatex. GraphLatex makes fairly nice 2D plots as tikzpicture with latex formatting on labels and lots of great customisations options. I would put a link to the docs but for some reason I don't have any Karma yet and cannot. For large, dense graphs it can be hard to view the whole thing on the default settings that view(H) gives you. In that case export the latex to a file and compile it in a minimal document with resizebox, e.g., as follows:

sage code:

graphic_size=(200,200), #large value helps for large dense graphs
#view(H) #just display the latex graph in sage or in pdf viewer
with open('graph_tmp.tex','w') as f:

latex document:

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2016-01-17 07:23:52 -0500

Seen: 162 times

Last updated: Jan 18 '16