Ask Your Question

Changing the vertex shape for combinatorial graphs

asked 2012-04-04 12:14:20 -0600

araichev gravatar image

updated 2015-10-18 07:17:51 -0600

FrédéricC gravatar image

Hi all:

Given a combinatorial graph (the nodes and edges type) $g$, what are the valid vertex_shape options for g.plot()? I can't find them in the Sage reference manual. I want to make square vertices.


edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2012-04-04 16:28:33 -0600

fidbc gravatar image


Sage uses matplotlib to plot graphs, and valid vertex shapes seem to be valid matplotlib markers, you chan check the matplotlib documentation for some other valid markers.

If you want squares, then you can try, say

sage: g=graphs.PetersenGraph();gp=g.graphplot()
sage: gp.set_vertices(vertex_shape='s');gp.plot()

Apparently changing vertex shapes is still not available for Multi-edged Digraphs though.

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


Asked: 2012-04-04 12:14:20 -0600

Seen: 403 times

Last updated: Apr 04 '12