networkit.plot

networkit.plot.clusteringPerDegree(G, **kwargs)

Plots the local clustering coefficient for all degrees that exist in the given graph.

Parameters:

G (networkit.Graph) – The input graph.

networkit.plot.connectedComponentsSizes(G, relativeSizes=True)

Plot the size distribution of connected components as a pie chart using matplotlib.

Parameters:
  • G (networkit.Graph) – The input graph.

  • relativeSizes (bool, optional) – If relativeSizes is set to True, the component sizes in the pie chart will correlate with their number of nodes. Default: True

networkit.plot.coreDecompositionSequence(G, *args, **kwargs)

Plots the core decomposition sequence of G, i.e. the size of the k-shell for the core number k using matplotlib.

Parameters:
  • G (networkit.Graph) – The input graph.

  • *args (list()) – Additional *args parameter passed to matplotlib.pyplot.bar.

  • **kwargs (dict()) – Additional **kwargs parameter passed to matplotlib.pyplot.bar

networkit.plot.degreeDistribution(G, *args, **kwargs)

Plots the degree distribution of the given network using matplotlib.

Parameters:
  • G (networkit.Graph) – The input graph.

  • *args (list()) – Additional *args parameter passed to matplotlib.pyplot.bar.

  • **kwargs (dict()) – Additional **kwargs parameter passed to matplotlib.pyplot.bar

networkit.plot.hopPlot(G, **kwargs)

Prints the hop-plot using matplotlib.

Parameters:
  • G (networkit.Graph) – The input graph.

  • *args (list()) – Additional *args parameter passed to matplotlib.pyplot.bar.

  • **kwargs (dict()) – Additional **kwargs parameter passed to matplotlib.pyplot.bar

networkit.plot.nodeAttributes(G, sorted=True)

General plotting function for a node attributes using matplotlib.

Parameters:
  • G (*kargs) – Input Graph of which node attributes are being plotted.

  • attribute (nk.graph.NodeAttribute or tuple(nk.graph.NodeAttribute)) – (tuple of) nk.graph.NodeAttribute attached to the graph.