在graph_tool中设置标签(vertex_text)的zorder

问题描述 投票:0回答:1

我有一种情况,其中

vertex_text
隐藏在一个顶点后面(如下图中的红色方块所示)。我使用
graph_tool
的圆形布局 (
minimize_nested_blockmodel_dl
) 绘制了这个网络。

graph_tool
的文档(https://graph-tool.skewed.de/static/doc/draw.html)中,我没有找到任何方法为
zorder
设置
vertex_text

我想知道是否可以在

graph_tool
中设置元素的 zorders。我想知道是否有任何解决方法,同时保持绘图和标签不变,即相同的大小、布局和位置。

如果这有用,作为参考,这里是我在

draw
模块中使用的与顶点相关的参数:

vertex_text=[list of labels],
vertex_fill_color=[list of colors],
valpha=1,
vertex_size=10,
vertex_pen_width=0,
vertex_text_position=-2,
python matplotlib draw graph-tool
1个回答
1
投票

这可以使用

vorder
参数来完成,该参数确定绘制节点及其标签的相对顺序。

© www.soinside.com 2019 - 2024. All rights reserved.