sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.41k stars 474 forks source link

Fully implement edge thickness in plots of graphs #6546

Open 1d7ec08f-60ae-4512-91a6-8324c06eab9f opened 15 years ago

1d7ec08f-60ae-4512-91a6-8324c06eab9f commented 15 years ago

There is an option for specifying the thickness/width of an edge in a graph ("thickness"). For a graph G,

G.plot(thickness=10)

works as expected, but

show(G, thickness=10)

raises an error about the option name being unrecognized.

Also, I couldn't find any mention of this parameter in the documentation anywhere.

CC: @slel

Component: graph theory

Keywords: plot graph edge width thickness

Branch/Commit: u/ppurka/fully_implement_edge_thickness_in_plots_of_graphs @ be6042d

Issue created by migration from https://trac.sagemath.org/ticket/6546

1d7ec08f-60ae-4512-91a6-8324c06eab9f commented 10 years ago
comment:2

It would seem this has gone backwards. Now .plot() complains about not understanding thickness. Drawing a (graphics primitive) line understands thickness. So it should be a matter of making thickness a valid option of a graph plot and passing it to matplotlib in graphs/graph_plot.py when drawing (straight) edges. Maybe curved edges would be just as easy?

ppurka commented 10 years ago

Branch: u/ppurka/fully_implement_edge_thickness_in_plots_of_graphs

ppurka commented 10 years ago

Commit: be6042d

ppurka commented 10 years ago
comment:6

A preliminary patch is attached. Just wanted to get an implementation out there, so that others can look at it or enhance it.


New commits:

af3e48einitial commit to enable thickness of edges in graph plots
be6042dintroduce thickness parameter in scatter_plot
slel commented 6 years ago

Description changed:

--- 
+++ 
@@ -1,4 +1,4 @@
-There is an option for specifying the thickness/width of an edge in a graph ("thickness").  For a graph `G`
+There is an option for specifying the thickness/width of an edge in a graph ("thickness").  For a graph `G`,

 `G.plot(thickness=10)`
slel commented 6 years ago
comment:8

See also #20035, #21540.