Ask Your Question
1

Changing the vertex shape for combinatorial graphs

asked 2012-04-04 19:14:20 +0200

araichev gravatar image

updated 2015-10-18 14:17:51 +0200

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.

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2012-04-04 23:28:33 +0200

fidbc gravatar image

Hi,

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

Comments

slelievre gravatar imageslelievre ( 2018-07-11 09:29:07 +0200 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-04-04 19:14:20 +0200

Seen: 898 times

Last updated: Apr 04 '12