[Networkit] degree distribution from profiling module?

Maximilian Vogel maximilian.vogel at student.kit.edu
Tue May 17 22:09:51 CEST 2016


Hi there,

the profiling module can be customized to only run the DegreeCentrality 
which is also plotted. If you're looking for a different visualization 
or if that is too bloated, this little piece of code for matplotlib 
might help:

dd  =  sorted(centrality.DegreeCentrality(G).run().scores(),  reverse=True)
plt.xscale("log")
plt.xlabel("degree")
plt.yscale("log")
plt.ylabel("number of nodes")
plt.plot(dd)
plt.show()


Anything beyond that you have to code yourself, I guess. ;-)

Best,
Max


On 17.05.2016 21:01, Stephen North wrote:
> Greetings.  The profiling module seems quite powerful,
> or at least it has a lot of options.
>
> Is there an easy way to produce typical charts like degree
> distribution, or should I code this myself in matplotlib?
>
> Thank you for the help!
>
> Stephen North
>
>
> _______________________________________________
> NetworKit mailing list
> NetworKit at ira.uni-karlsruhe.de
> https://lists.ira.uni-karlsruhe.de/mailman/listinfo/networkit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ira.uni-karlsruhe.de/pipermail/networkit/attachments/20160517/7e5271f0/attachment.html>


More information about the NetworKit mailing list