opendvp.plotting.plot_graph_network

opendvp.plotting.plot_graph_network#

opendvp.plotting.plot_graph_network(w, coords, threshold, return_fig=False, ax=None, **kwargs)#

Plot the graph of connected nodes for a given threshold.

Return type:

Figure | None

Parameters#

wlibpysal.weights.DistanceBand

The distance band weights object.

coordsarray-like

The coordinates of the points.

thresholdfloat

The threshold used to create the DistanceBand object.

return_figbool, optional

If True, returns the matplotlib Figure object for further customization. If False, shows the plot.

axmatplotlib.axes.Axes, optional

Axes object to plot on. If None, a new figure and axes are created.

**kwargs

Additional keyword arguments passed to networkx.draw.

Returns:#

figmatplotlib.figure.Figure or None

The figure object if return_fig is True, otherwise None.