opendvp.pl.plot_graph_network#
- plot_graph_network(w, coords, threshold, return_fig=False, ax=None, **kwargs)#
Plot the graph of connected nodes for a given threshold.
- Parameters:
w (libpysal.weights.DistanceBand) – The distance band weights object.
coords (array-like) – The coordinates of the points.
threshold (float) – The threshold used to create the DistanceBand object.
return_fig (bool, optional) – If True, returns the matplotlib Figure object for further customization. If False, shows the plot.
ax (matplotlib.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:
fig – The figure object if return_fig is True, otherwise None.
- Return type:
matplotlib.figure.Figure or None