Assortativity - Degree correlation plot!

466 views
Skip to first unread message

Rajat Khanna

unread,
May 16, 2018, 1:22:02 PM5/16/18
to networkx-discuss
Hi guys - I am working on a paper in which I am examining assortativity of scientists' network. I found the code to calculate the assortativity of networks, but was wondering if there is any way to plot the degree correlation (plot of nodes' degrees vs. average degree of their neighbors) of networks to show the assortative nature of networks graphically? Let me know. Appreciate any help!

Thanks
Rajat

dzinoviev

unread,
May 16, 2018, 5:42:22 PM5/16/18
to networkx...@googlegroups.com
Use matplotlib.plot.scatter(x,y) where x is a list if degrees and y is a list of neighbors' degrees.



Dmitry Zinoviev, Professor, Suffolk University 
Author of Data Science Essentials in Python 
--
You received this message because you are subscribed to the Google Groups "networkx-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to networkx-discu...@googlegroups.com.
To post to this group, send email to networkx...@googlegroups.com.
Visit this group at https://groups.google.com/group/networkx-discuss.
For more options, visit https://groups.google.com/d/optout.

Rajat Khanna

unread,
May 16, 2018, 6:04:51 PM5/16/18
to networkx...@googlegroups.com
Thanks for the suggestion. I am new to the Python so finding it difficult to write the code completely. Could you write the full code for an example network like karate club or the small world?

Thanks
Rajat

dzinoviev

unread,
May 16, 2018, 6:32:32 PM5/16/18
to networkx...@googlegroups.com
You may want to have a look at my book (see signature), it has a similar example.

Akileshvar A Mosi

unread,
Feb 21, 2020, 1:58:30 PM2/21/20
to networkx-discuss
Hello, did you find the way?
Reply all
Reply to author
Forward
0 new messages