arrange nodes in concentric circles around a focal node according to their distance from the focus.

## Usage

```
layout_with_focus(g, v, weights = NA, iter = 500, tol = 1e-04)
layout_igraph_focus(g, v, weights = NA, iter = 500, tol = 1e-04, circular)
```

## Arguments

- g
igraph object

- v
id of focal node to be placed in the center

- weights
possibly a numeric vector with edge weights. If this is NULL and the graph has a weight edge attribute, then the attribute is used. If this is NA then no weights are used (even if the graph has a weight attribute). By default, weights are ignored. See details for more.

- iter
number of iterations during stress optimization

- tol
stopping criterion for stress optimization

- circular
not used

## Details

Be careful when using weights. In most cases, the inverse of the edge weights should be used to ensure that the endpoints of an edges with higher weights are closer together (weights=1/E(g)$weight).

## References

Brandes, U., & Pich, C. (2011). More flexible radial layout. *Journal of Graph Algorithms and Applications*, 15(1), 157-173.

## See also

layout_focus_group The layout_igraph_* function should not be used directly. It is only used as an argument for plotting with 'igraph'. 'ggraph' natively supports the layout.

## Examples

```
library(igraph)
g <- sample_gnp(10, 0.4)
coords <- layout_with_focus(g, v = 1)
coords
#> $xy
#> [,1] [,2]
#> [1,] 0.00000000 0.0000000
#> [2,] 0.57244927 0.8199401
#> [3,] -0.10296818 0.9946847
#> [4,] 1.92096512 0.5566803
#> [5,] 1.18164280 1.6136047
#> [6,] -0.95517915 0.2960283
#> [7,] -0.96541978 1.7515606
#> [8,] 0.42907519 1.9534315
#> [9,] -0.03459669 1.9997007
#> [10,] 0.76576592 0.6431194
#>
#> $distance
#> [1] 0 1 1 2 2 1 2 2 2 1
#>
```