# plot.nb: Plot a neighbours list In spdep: Spatial Dependence: Weighting Schemes, Statistics and Models

## Description

A function to plot a neighbours list given point coordinates to represent the region in two dimensions; `plot.listw` is a wrapper that passes its neighbours component to `plot.nb`.

## Usage

 ```1 2 3 4 5 6``` ```## S3 method for class 'nb' plot(x, coords, col="black", points=TRUE, add=FALSE, arrows=FALSE, length=0.1, xlim=NULL, ylim=NULL, ...) ## S3 method for class 'listw' plot(x, coords, col="black", points=TRUE, add=FALSE, arrows=FALSE, length=0.1, xlim=NULL, ylim=NULL, ...) ```

## Arguments

 `x` an object of class `nb` or (for `plot.listw`) class `listw` `coords` matrix of region point coordinates `col` plotting colour `points` (logical) add points to plot `add` (logical) add to existing plot `arrows` (logical) draw arrowheads for asymmetric neighbours `length` length in plot inches of arrow heads drawn for asymmetric neighbours lists `xlim, ylim` plot window bounds `...` further graphical parameters as in `par(..)`

## Author(s)

Roger Bivand [email protected]

`summary.nb`
 ```1 2 3 4 5 6 7 8``` ```if (require(rgdal, quietly=TRUE)) { example(columbus, package="spData") coords <- coordinates(columbus) plot(col.gal.nb, coords) title(main="GAL order 1 links with first nearest neighbours in red") col.knn <- knearneigh(coords, k=1) plot(knn2nb(col.knn), coords, add=TRUE, col="red", length=0.08) } ```