Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
1

Changing the vertex shape for combinatorial graphs

asked 12 years ago

araichev gravatar image

updated 9 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

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.

Preview: (hide)
link

Comments

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: 12 years ago

Seen: 1,020 times

Last updated: Apr 04 '12