networkx.draw()

• G (graph) – A networkx graph
• pos (dictionary, optional) – A dictionary with nodes as keys and positions as values. If not specified a spring layout positioning will be computed. See networkx.drawing. layout for functions that compute node positions.
• arrows (bool, optional (default=True)) – For directed graphs, if True draw arrowheads. Note: Arrows will be the same color as edges.
• arrowstyle (str, optional (default=’-|>’)) – For directed graphs, choose the style of the arrowsheads. See :py:class: matplotlib.patches.ArrowStyle for more options.
• arrowsize (int, optional (default=10)) – For directed graphs, choose the size of the arrow head head’s length and width. See :py:class: matplotlib.patches. FancyArrowPatch for attribute mutation_scale for more info.
• with_labels (bool, optional (default=True)) – Set to True to draw labels on the nodes.
• ax (Matplotlib Axes object, optional) – Draw the graph in the specified Matplotlib axes.
• nodelist (list, optional (default G.nodes())) – Draw only specified nodes
• edgelist (list, optional (default=G.edges())) – Draw only specified edges
• node_size (scalar or array, optional (default=300)) – Size of nodes. If an array is specified it must be the same length as nodelist.
• node_color (color string, or array of floats, (default=’r’)) – Node color. Can be a single color format string, or a sequence of colors with the same length as nodelist. If numeric val- ues are specified they will be mapped to colors using the cmap and vmin,vmax parameters. See matplotlib.scatter for more details.
• node_shape (string, optional (default=’o’)) – The shape of the node. Specification is as matplotlib.scatter marker, one of ‘so^>v<dph8’.
• alpha (float, optional (default=1.0)) – The node and edge transparency
• cmap (Matplotlib colormap, optional (default=None)) – Colormap for mapping intensities
of nodes
• vmin,vmax (float, optional (default=None)) – Minimum and maximum for node colormap scaling
• linewidths ([None | scalar | sequence]) – Line width of symbol border (default =1.0)
• width (float, optional (default=1.0)) – Line width of edges
• edge_color(colorstring,orarrayoffloats(default=’r’))–Edgecolor.Canbeasinglecolor format string, or a sequence of colors with the same length as edgelist. If numeric values are specified they will be mapped to colors using the edge_cmap and edge_vmin,edge_vmax parameters.
• edge_cmap (Matplotlib colormap, optional (default=None)) – Colormap for mapping in- tensities of edges
• edge_vmin,edge_vmax (floats, optional (default=None)) – Minimum and maximum for edge colormap scaling
• style (string, optional (default=’solid’)) – Edge line style (solid|dashed|dotted,dashdot)

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值