Skip to content
Snippets Groups Projects
Commit 45d12052 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Add backgroundcolor and fontsize

Better to see a single label than several labels at the same position.
parent d4aa171e
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,8 @@ def plot_nbunch(G, nbunch, color = '#1f78b4', label = None, ax = None):
if is_node_type(G, n, label):
xy = ax.projection.transform_point(*pos[n], src_crs)
ax.annotate(str(n), xy, color = color, xytext = (2, 2),
textcoords = 'offset points')
textcoords = 'offset points',
backgroundcolor = "white", fontsize = "xx-small")
def plot_all_components(G, label):
for component, color in zip(G.graph["component_list"], color_iter):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment