Skip to content

fix: handle text wrapping if width=0#439

Merged
ntamas merged 1 commit intoigraph:masterfrom
jboynyc:fix-text-wrap
Oct 1, 2021
Merged

fix: handle text wrapping if width=0#439
ntamas merged 1 commit intoigraph:masterfrom
jboynyc:fix-text-wrap

Conversation

@jboynyc
Copy link
Copy Markdown
Contributor

@jboynyc jboynyc commented Oct 1, 2021

Current behavior:

g = ig.Graph.Erdos_Renyi(5, m=4)
ig.plot(g, wrap_labels=True, vertex_size=[5, 5, 5, 5, 0], vertex_label=list('abcde'))
# -> UnboundLocalError: local variable 'iterlines' referenced before assignment

This fix makes sure that iterlines is properly set even if a vertex has size 0.

@ntamas
Copy link
Copy Markdown
Member

ntamas commented Oct 1, 2021

Thanks a lot!

@ntamas ntamas merged commit 97be0c1 into igraph:master Oct 1, 2021
@jboynyc jboynyc deleted the fix-text-wrap branch October 2, 2021 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants