question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I increase the maximum number of communities in a graph visualization?

See original GitHub issue

Hi, May I please ask you two questions in graph visualization?

  1. The maximum number of communities is 16 (the same as the number of COLOR elements); is there a reason why it’s limited to 16?
  2. Do you plan to apply a lighter color to a label if the node is a dark color?

Is your feature request related to a problem? Please describe.

  • I’m stuck with a limited number of communities
  • If the node is dark, the label is hard to see

Describe the solution you’d like

  • I don’t want the number of communities to be limited.
  • I’d like to determine the color of the label based on the relative luminance of the node’s color.
  • I’d like to apply a color map if possible.

Describe alternatives you’ve considered I’ve tried to create an implementation.

Additional context

font color

G = nx.karate_club_graph()
coms = algorithms.louvain(G)
pos = nx.spring_layout(G, k=0.3)

# viz.plot_network_clusters(G, coms, pos, plot_overlaps=True, plot_labels=True, cmap=None)
# viz.plot_network_clusters(G, coms, pos, plot_overlaps=True, plot_labels=True, cmap="jet")
viz.plot_network_clusters(G, coms, pos, plot_overlaps=True, plot_labels=True, cmap=plt.cm.Wistia)

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
GiulioRossetticommented, Aug 21, 2020

That’s great! I didn’t notice the luminance fix (I only quickly skimmed the code, my fault!) 😃

Filtering out small communities should be trivial: the list that contains them in the CDlib clustering object is already ordered by (decreasing) size.

0reactions
eternity1984commented, Aug 21, 2020

Thank you! I’ll send a pull request later.😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to increase the number of categories displayed in a bar ...
Hover the cursor over the Graph panel, then click the arrow icon in the top right and select the Show Properties option. 3....
Read more >
Getting Started with Community Detection in Graphs and ...
Under the Girvan-Newman algorithm, the communities in a graph are discovered by iteratively removing the edges of the graph, based on the edge ......
Read more >
Multi-scale community visualization of massive graph data
Graph visualizations increase the perception of entity relationships in a network. However, as graph size ... The smallest maximum number of child nodes...
Read more >
Large Graph Visualization Tools and Approaches
The most powerful graph visualization tool that I know. It has GUI, it contains several layouts and a lot of graph analysis tools....
Read more >
Using Gephi to visualise and understand communities
Quick video to show how you can use Gephi (a free graph visualisation tool) to quickly visualise communities in a network and use...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found