Skip to content
#

networkx

Here are 378 public repositories matching this topic...

dridk
dridk commented Jan 28, 2020
  • nxviz version: 0.6.1
  • Python version: 3.7.4
  • Operating System: Linux

Description

The following example doesn't work with networkx 2.4 :

from random import choice

import matplotlib.pyplot as plt
import networkx as nx
from nxviz.plots import CircosPlot

G = nx.barbell_graph(m1=10, m2=3)
for n, d in G.nodes(data=True):
    G.nodes[n]["class"] = choice(["a", "b", "c",
floklimm
floklimm commented Dec 19, 2019

This is not really a bug but rather a workaround that I wanted to make available for others (and maybe you want to integrate it at some point into the library itself).

I wanted to color all nodes by a node property. It is possible to achieve this by using the coloring by `group'. One only has to assign each node an html color according to its value.

Below I give a minimal example that colors

EgoSplitting

Improve this page

Add a description, image, and links to the networkx topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the networkx topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.