def plot_workflow_graph_image(self):
"""
Show the image from workflow_graph
"""
# Change layout according to necessity
pos = nx.spring_layout(self.graph)
nx.draw(self.graph, pos, node_color='#004a7b', node_size=2000,
edge_color='#555555', width=1.5, edge_cmap=None,
with_labels=True, style='dashed',
label_pos=50.3, alpha=1, arrows=True, node_shape='s',
font_size=8,
font_color='#FFFFFF')
# Must import pyplot here!
import matplotlib.pyplot as plt
plt.show()
# If necessary save the image
# plt.savefig(filename, dpi=300, orientation='landscape', format=None,
# bbox_inches=None, pad_inches=0.1)
评论列表
文章目录