plot.choicealpha {ClustGeo} | R Documentation |

Plot two curves of explained
inertia (one for `D0`

and one for `D1`

) calculated with
`choicealpha`

.

```
## S3 method for class 'choicealpha'
plot(
x,
norm = FALSE,
lty = 1:2,
pch = c(8, 16),
type = c("b", "b"),
col = 1:2,
xlab = "alpha",
ylab = NULL,
legend = NULL,
cex = 1,
...
)
```

`x` |
an object of class |

`norm` |
if TRUE, the normalized explained inertia are plotted. Otherwise, the explained inertia are plotted. |

`lty` |
a vector of size 2 with the line types of the two curves. See par |

`pch` |
a vector of size 2 specifying the symbol for the points of the two curves. See par |

`type` |
a vector of size 2 specifying the type of lines of the two curves. See par |

`col` |
a vector of size 2 specifying the colors the two curves. See par |

`xlab` |
the title fot the x axis. |

`ylab` |
the title fot the y axis. |

`legend` |
a vector of size two the the text for the legend of the two curves. |

`cex` |
text size in the legend. |

`...` |
further arguments passed to or from other methods. |

M. Chavent, V. Kuentz-Simonet, A. Labenne, J. Saracco. ClustGeo: an R package for hierarchical clustering with spatial constraints. Comput Stat (2018) 33: 1799-1822.

```
data(estuary)
D0 <- dist(estuary$dat)
D1 <- as.dist(estuary$D.geo) # the geographic distances between the cities
range.alpha <- seq(0,1,0.1)
K <- 5
cr <- choicealpha(D0,D1,range.alpha,K,graph=FALSE)
plot(cr,cex=0.8,norm=FALSE,cex.lab=0.8,ylab="pev",
col=3:4,legend=c("socio-demo","geo"), xlab="mixing parameter")
plot(cr,cex=0.8,norm=TRUE,cex.lab=0.8,ylab="pev",
col=5:6,pch=5:6,legend=c("socio-demo","geo"), xlab="mixing parameter")
```

[Package *ClustGeo* version 2.1 Index]